Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#15265 closed defect (bug) (fixed)

PHP Notice undefined string offset in post.php

Reported by: solarissmoke Owned by:
Priority: normal Milestone: 3.1
Component: Editor Version: 3.1
Severity: trivial Keywords: has-patch
Cc:

Description

I'm getting the following PHP Notice in debug mode when creating/editing posts:

Uninitialized string offset: 0 in \wp\wp-admin\includes\post.php on line 1549

It's because some of the TinyMCE initArray options are empty strings. Suggest adding an extra check in line 1549's elseif.

Attachments (1)

15265.patch (518 bytes) - added by solarissmoke 3 years ago.
Check that string is non-empty before looking for first character

Download all attachments as: .zip

Change History (5)

Check that string is non-empty before looking for first character

  • Keywords has-patch added
  • Severity changed from minor to trivial
  • Resolution set to fixed
  • Status changed from new to closed

(In [16112]) Check for empty strings before indexing into them. Fixes #15265 props solarissmoke.

  • Milestone changed from Awaiting Review to 3.1
Note: See TracTickets for help on using tickets.