[wp-trac] [WordPress Trac] #20966: Inconsistent Variable Usage
WordPress Trac
wp-trac at lists.automattic.com
Sun Jun 17 16:06:14 UTC 2012
#20966: Inconsistent Variable Usage
-------------------------------------------+-----------------------
Reporter: ericmann | Owner: ericmann
Type: defect (bug) | Status: new
Priority: normal | Milestone: 3.4.1
Component: Upgrade/Install | Version: 3.1
Severity: minor | Resolution:
Keywords: has-patch dev-feedback commit |
-------------------------------------------+-----------------------
Comment (by cogmios):
I found out... that if I run in a PHP version < 5.4
{{{
$expected_array_got_string = 'somestring';
echo $expected_array_got_string['some_key'];
}}}
that it returns "s"
However starting from PHP version 5.4. it will throw: Warning: Illegal
string offset 'some_key'
:)
I think that's the reason for the low amount of users seeing it...
(see also example 2 here: http://php.net/manual/en/function.empty.php
--
Ticket URL: <http://core.trac.wordpress.org/ticket/20966#comment:7>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list