Make WordPress Core

Opened 9 years ago

Closed 9 years ago

#9800 closed defect (bug) (fixed)

Widget API won't work with PHP 4

Reported by: codestyling Owned by:
Milestone: 2.8 Priority: high
Severity: blocker Version:
Component: Widgets Keywords: widgets PHP4
Focuses: Cc:


I have tested the latest SVN version of WP2.8 based on SVN update from 12.05.2009 and it's not possible to place/arrange widgets within Administration. The only shown widget of Standard Theme is Archives but all other are missing. This one can't be saved too. There are some really strange problems inside the code, that doesn't work correctly with read/write options and also content generation of widget containers. May be, that this is forced by ref/by value behavoir which is different between PHP4 and PHP5.

If it's intended to require PHP5 with WordPress 2.8, please cancel this ticket and publish this information soon. Otherwise please test it and make it work.

Change History (7)

#1 @ryan
9 years ago

  • Component changed from Administration to Widgets
  • Owner anonymous deleted

#2 @ryan
9 years ago

Confirmed. I see this warning over and over that I don't see with PHP 5:

[12-May-2009 10:35:30] PHP Notice:  Undefined offset:  3 in /Applications/MAMP/htdocs/trunk/wp-includes/widgets.php on line 257

#3 @ryan
9 years ago

WP_Widget::get_settings(), when called from form_callback(), always returns the settings of the last registered widget, WP_Tag_Cloud.

#4 @ryan
9 years ago

All callbacks point to the last widget registered.

Changing this:

return array(&$this, 'form_callback');

to this:

return array($this, 'form_callback');

fixes the problem but is an ugly solution.

#5 @ryan
9 years ago

(In [11310]) Fix widget registration with PHP 4. see #9800

#6 @ryan
9 years ago

Try that out.

#7 @ryan
9 years ago

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.