Make WordPress Core

Opened 11 years ago

Closed 11 years ago

#16080 closed defect (bug) (fixed)

PHP4 Compat

Reported by: westi Owned by:
Milestone: 3.1 Priority: high
Severity: critical Version: 3.1
Component: Warnings/Notices Keywords: needs-patch
Focuses: Cc:

Description (last modified by westi)

just installed a brand spanking new installation here:


This is the error I get:

*Parse error*: syntax error, unexpected '&', expecting T_VARIABLE or '$' in
*/home/misha/public_html/testbed/wp-includes/class-wp-admin-bar.php* on line

Attachments (2)

admin-bar-class-php4-compat.diff (520 bytes) - added by westi 11 years ago.
PHP4 compat code
media-php4-compat.diff (486 bytes) - added by SergeyBiryukov 11 years ago.

Download all attachments as: .zip

Change History (8)

#1 @westi
11 years ago

  • Description modified (diff)

11 years ago

PHP4 compat code

#2 @nacin
11 years ago

  • Summary changed from PHP4 Compat: foreach with reference in admin bar class to PHP4 Compat


Parse error: syntax error, unexpected '&', expecting T_VARIABLE or '$' in /home/content/w/h/e/wheat395/html/wordpress/wp-admin/includes/media.php on line 1479

Looks like we need to find our PHP4 testbeds this week :-)

#3 @nacin
11 years ago

With regards to incompatible foreach issues, a grep only finds these two.

wpgrep foreach.*\&
./wp-admin/includes/media.php:1479:foreach ( $post_params as $param => & $val )
./wp-includes/class-wp-admin-bar.php:160:		foreach( $menu as $id => &$menu_item ) {

Can probably check for parse errors across all files on a testbed for other things.

#4 @SergeyBiryukov
11 years ago

Created the patch for wp-admin/includes/media.php.

Checked all the common screens (including Network Admin) on PHP 4.4.7. Seem to work correctly.

#5 @ryan
11 years ago

(In [17211]) PHP4 compat. Props SergeyBiryukov, westi. see #16080

#6 @ryan
11 years ago

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