Make WordPress Core

Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#15265 closed defect (bug) (fixed)

PHP Notice undefined string offset in post.php

Reported by: solarissmoke's profile solarissmoke Owned by:
Milestone: 3.1 Priority: normal
Severity: trivial Version: 3.1
Component: Editor Keywords: has-patch
Focuses: 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 14 years ago.
Check that string is non-empty before looking for first character

Download all attachments as: .zip

Change History (5)

@solarissmoke
14 years ago

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

#1 @solarissmoke
14 years ago

  • Keywords has-patch added

#2 @solarissmoke
14 years ago

  • Severity changed from minor to trivial

#3 @automattor
14 years ago

  • Resolution set to fixed
  • Status changed from new to closed

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

#4 @westi
14 years ago

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