WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 5 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:

Description

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)

comment:1 ryan5 years ago

  • Component changed from Administration to Widgets
  • Owner anonymous deleted

comment:2 ryan5 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

comment:3 ryan5 years ago

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

comment:4 ryan5 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.

comment:5 ryan5 years ago

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

comment:6 ryan5 years ago

Try that out.

comment:7 ryan5 years ago

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