Edit report at https://pear.php.net/bugs/bug.php?id=18060&edit=1
ID: 18060
Updated by: [email protected]
Reported By: trobinson at gksystems dot com
Summary: operator precedence error in _getNextToken
-Status: Open
+Status: Duplicate
Type: Bug
Package: Net_IMAP
Operating System: Windows
Package Version: 1.1.0
PHP Version: 5.3.0
Roadmap Versions:
New Comment:
-Status: Open
+Status: Duplicate
Appears already fixed in git
Previous Comments:
------------------------------------------------------------------------
[2011-06-16 19:17:16] stoodder
Thanks! This fixed up a huge problem for me with getBodyPart. Glad the
fix was this simple.
------------------------------------------------------------------------
[2011-02-20 05:08:18] doconnor
Got a test script that shows the broken/fixed behaviour?
------------------------------------------------------------------------
[2010-11-16 00:59:04] tom_robinson
Description:
------------
If the next token starts with "{", $posClosingBraces will be assigned
False instead of the position of the closing brace.
Starting on line 2572:
if ($posClosingBraces = $this->_getClosingBracesPos($str,
'{',
'}') ==
false) {
The '==' operator is taking precendence over the '='.
Parentheses should be added:
if (($posClosingBraces = $this->_getClosingBracesPos($str,
'{',
'}')) ==
false) {
Test script:
---------------
No test script needed. Clearly a coding error.
------------------------------------------------------------------------