[wp-trac] [WordPress Trac] #27656: PHP Strict Standards: Only variables should be passed by reference in wp-includes/class-oembed.php on line 139

WordPress Trac noreply at wordpress.org
Sat Apr 5 06:08:23 UTC 2014


#27656: PHP Strict Standards: Only variables should be passed by reference in wp-
includes/class-oembed.php on line 139
--------------------------+-----------------------
 Reporter:  markjaquith   |       Owner:  dd32
     Type:  defect (bug)  |      Status:  assigned
 Priority:  low           |   Milestone:  3.9
Component:  Embeds        |     Version:
 Severity:  minor         |  Resolution:
 Keywords:                |     Focuses:
--------------------------+-----------------------

Comment (by dd32):

 I am almost 100% certain that removing these will have no detrimental
 impact. The usage of byref appears to be due to an attempt to keep memory
 footprint small and avoid the (potentially large) HTTP response being
 copied multiple times.. that being said, I'm not even sure if that was a
 risk under PHP4..

 If the $response was an object instead of an array (..which it ideally
 should've been) then we may have had object copying memory-related issues
 in PHP4 ''but it wasn't'', so there's really no reason why to use a byref
 here.

 I'm on the fence still, a) removing the refs, b) splitting the oembed
 calls, c) leaving it as-is and removing the refs at the start of the next
 cycle.. lets face it, this isn't a new warning, although I don't like it
 as much as the rest of you.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/27656#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list