antonk5 / php-amqplib

Automatically exported from code.google.com/p/php-amqplib
GNU Lesser General Public License v2.1
0 stars 0 forks source link

value too big exception from bytesplit #13

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I was getting floating point answers from bcdiv in this code, debian
unstable, PHP Version 5.2.11-2.

Fixed it for me, to add the scale argument, i.e.:

            $x=bcdiv($x,'256', 0);

Original issue reported on code.google.com by jfbca...@gmail.com on 7 Jan 2010 at 1:17

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Lyolik please review these bugs.

Original comment by kroko...@gmail.com on 21 Mar 2010 at 9:17

GoogleCodeExporter commented 9 years ago
Have same issue.
Value too big!
#0 /usr/share/php/commonlib/php-amqplib/PhpAmqpLib/Wire/AMQPWriter.php(16): 
PhpAmqpLib\Wire\AMQPWriter::bytesplit(9, 4)
#1 /usr/share/php/commonlib/php-amqplib/PhpAmqpLib/Wire/AMQPWriter.php(129): 
PhpAmqpLib\Wire\AMQPWriter::chrbytesplit(9, 4)
#2 /usr/share/php/commonlib/php-amqplib/PhpAmqpLib/Wire/AMQPWriter.php(173): 
PhpAmqpLib\Wire\AMQPWriter->write_long(9)
#3 /usr/share/php/commonlib/php-amqplib/PhpAmqpLib/Wire/AMQPWriter.php(203): 
PhpAmqpLib\Wire\AMQPWriter->write_longstr('terbooter')
#4 
/usr/share/php/commonlib/php-amqplib/PhpAmqpLib/Connection/AMQPConnection.php(47
): PhpAmqpLib\Wire\AMQPWriter->write_table(Array)

Bug reproduced on Win7 and Debian5 (PHP 5.3.3-7+squeeze3) 

Trying to send this string
{"uid":"390523993184","message":"\u0414\u043c\u0438\u0442\u0440\u0438\u0439 
\u0417\u0438\u043d\u043e\u0432\u044c\u0435\u0432 \u0443\u0437\u043d\u0430\u043b 
\u043f\u0440\u043e\u0433\u043d\u043e\u0437 \u0432\u0430\u0448\u0438\u0445 
\u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0439 \u0438 
\u0434\u043e\u0431\u0430\u0432\u0438\u043b \u0412\u0430\u043c 2 
\u043c\u043e\u043d\u0435\u0442\u044b"}

Bug happens 1 time from 10 tests

Original comment by terboo...@gmail.com on 23 Jan 2012 at 9:48