Opened 14 years ago
Closed 14 years ago
#12167 closed defect (bug) (fixed)
Syntax Error in PHP4
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 3.0 | Priority: | normal |
Severity: | normal | Version: | 3.0 |
Component: | Warnings/Notices | Keywords: | has-patch tested |
Focuses: | Cc: |
Description
Steps to reproduce:
1) Load WordPress trunk (r. 13013) in PHP4
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;
Attachments (2)
Change History (7)
#1
@
14 years ago
You'll need to create a patch rather than upload the whole file. A patch is basically a .diff file that shows what CHANGES are made to the file and can be applied to the repository.
#3
@
14 years ago
- Keywords has-patch added; theme removed
- Milestone changed from 2.9.2 to 3.0
FYI: There's no other instance of function_that_returns_object()->method() or function_that_returns_object()->property in core. This one is it (according to grep).
I wrote it in [12915] forgetting about the PHP4 compat issue.
Adds a new line after 714.