[PEAR-BUG] Bug #18060 [Com]: operator precedence error in _getNextToken
[email protected] ("stoodder")
| Newsgroups | php.pear.bugs |
|---|---|
| Message-ID | <[email protected]> |
Edit report at http://pear.php.net/bugs/bug.php?id=18060&edit=1
ID: 18060
Comment by: stoodder
Reported By: stoodder at gmail dot com
Summary: operator precedence error in _getNextToken
Status: Open
Type: Bug
Package: Net_IMAP
Operating System: Windows
Package Version: 1.1.0
PHP Version: 5.3.0
New Comment:
Thanks! This fixed up a huge problem for me with getBodyPart. Glad the
fix was this simple.
Previous Comments:
------------------------------------------------------------------------
[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.
------------------------------------------------------------------------
--
Edit this bug report at http://pear.php.net/bugs/bug.php?id=18060&edit=1