Opened 2 years ago

Closed 2 years ago

#16080 closed defect (bug) (fixed)

PHP4 Compat

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

Description (last modified by westi)

just installed a brand spanking new installation here:

http://nicedoggie.net/testbed

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
*160*

Attachments (2)

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

Download all attachments as: .zip

Change History (8)

  • Description modified (diff)

westi2 years ago

PHP4 compat code

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

Another:

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 :-)

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.

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.

comment:5   ryan2 years ago

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

comment:6   ryan2 years ago

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