Opened 13 years ago
Closed 11 years ago
#18953 closed defect (bug) (invalid)
String index handling mistake in TinyMCE's JSON.php causes a PHP "Notice" message
Reported by: | carlosman | Owned by: | azaozz |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.2.1 |
Component: | TinyMCE | Keywords: | has-patch |
Focuses: | Cc: |
Description
In the SpellChecker plugin for TinyMCE with a PHP backend, in file JSON.php, in lines 332 ("read" function) and 350 ("peek" function), the $this->_data string index ($this->_pos) is compared with $this->_data string length ($this->_len). These allow errors in lines 339 and 351 of their respective functions, when the $this->_pos index gets to be equal to the length of the string. This situation generates the following messages to show up in PHP servers configured to show notice-level debug information:
Notice: Uninitialized string offset: <length of _data> in <WordPress path>/wp-includes/js/tinymce/plugins/spellchecker/classes/utils/JSON.php on line 351
Notice: Uninitialized string offset: <length of _data> in <WordPress path>/wp-includes/js/tinymce/plugins/spellchecker/classes/utils/JSON.php on line 339
I will attach a patch file to illustrate how I solved this situation.
Attachments (1)
Change History (6)
#5
@
11 years ago
- Milestone Awaiting Review deleted
- Resolution set to invalid
- Status changed from reviewing to closed
The bug still exists but we don't use the spellchecker plugin any more. A ticket on TinyMCE's bug tracker would be better.
Should probably be reported upstream?