[wp-trac] [WordPress Trac] #20756: Wrong reference returned in function &get_pages

WordPress Trac wp-trac at lists.automattic.com
Mon Aug 20 23:13:43 UTC 2012


#20756: Wrong reference returned in function &get_pages
------------------------------+-----------------------
 Reporter:  thomask           |       Owner:  foxinni
     Type:  defect (bug)      |      Status:  reopened
 Priority:  normal            |   Milestone:  3.5
Component:  Warnings/Notices  |     Version:  3.3.2
 Severity:  trivial           |  Resolution:
 Keywords:  has-patch         |
------------------------------+-----------------------
Changes (by Viper007Bond):

 * status:  closed => reopened
 * resolution:  fixed =>


Comment:

 I'm still getting this error.

 {{{
 Notice: Only variable references should be returned by reference in
 .../wp-includes/post.php on line 3524
 }}}

 PHP 5.3.5.

 It's due to this line:

 {{{
 return apply_filters( 'get_pages', $pages, $r );
 }}}

 And can be fixed by doing this:

 {{{
 $return = apply_filters( 'get_pages', $pages, $r );
 return $return;
 }}}

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/20756#comment:9>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list