Make WordPress Core

Opened 16 years ago

Closed 16 years ago

Last modified 16 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: Focuses:

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 16 years ago.
Check that string is non-empty before looking for first character

Download all attachments as: .zip

Change History (5)

@solarissmoke
16 years ago

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

#1 @solarissmoke
16 years ago

  • Keywords has-patch added

#2 @solarissmoke
16 years ago

  • Severity minor → trivial

#3 @automattor
16 years ago

  • Resolution → fixed
  • Status new → closed

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

#4 @westi
16 years ago

  • Milestone Awaiting Review → 3.1
Note: See TracTickets for help on using tickets.