[wp-trac] [WordPress Trac] #12167: Syntax Error in PHP4

WordPress Trac wp-trac at lists.automattic.com
Sun Feb 7 19:32:50 UTC 2010


#12167: Syntax Error in PHP4
------------------------------+---------------------------------------------
 Reporter:  blepoxp           |       Owner:  westi
     Type:  defect (bug)      |      Status:  new  
 Priority:  normal            |   Milestone:  2.9.2
Component:  Warnings/Notices  |     Version:  3.0  
 Severity:  normal            |    Keywords:  theme
------------------------------+---------------------------------------------
 Steps to reproduce:[[BR]]
 1) Load WordPress trunk (r. 13013) in PHP4[[BR]]
 2) Observe following error on screen:

 Parse error: syntax error, unexpected T_OBJECT_OPERATOR in
 /Applications/MAMP/htdocs/wptrunk/wp-includes/theme.php on line 714

 It appears that the arrow is causing the problem

 {{{
 $author = get_user_by( 'id', $author_id )->user_nicename;
 }}}

 I fixed by doing the following:

 {{{
 $author = get_user_by( 'id', $author_id );
 $author = $author->user_nicename;
 }}}

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


More information about the wp-trac mailing list