[wp-trac] [WordPress Trac] #17880: PHP4 + WordPress 3.2 = fatal error

WordPress Trac wp-trac at lists.automattic.com
Fri Jun 24 06:48:37 UTC 2011


#17880: PHP4 + WordPress 3.2 = fatal error
--------------------------+-----------------
 Reporter:  dd32          |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  3.2
Component:  General       |    Version:  3.2
 Severity:  normal        |   Keywords:
--------------------------+-----------------
 example:
 {{{
 Parse error: syntax error, unexpected T_VARIABLE in C:\www\wordpress-
 commit\wp-includes\load.php on line 564
 }}}

 This is caused by using PHP5 language before the php version checks have
 been done.

 Specifically:
 {{{
 function wp_clone( $object ) {
         return clone $object ;
 }
 }}}

 Changing it to:
 {{{
 function wp_clone( $object ) {
         return clone( $object );
 }
 }}}

 allows PHP4 to parse the file (as it see's a function call, to a not-yet-
 existant function) not a unknown language construct.

 This happens as load.php is included before the version checks are run. An
 alternate method would be to move the version checks into wp-settings.php
 again.

 I'm not sure if/how that affects the usage of the function, but it's how
 it was done in !WordPress 3.1

 As seen on the support forums: http://wordpress.org/support/topic/error-
 message-mysql

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/17880>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list