Req #66657 [Opn->Nab]: gmp_init('') throws warning

From: Date: Thu, 06 Feb 2014 22:07:20 +0000
Subject: Req #66657 [Opn->Nab]: gmp_init('') throws warning
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-184191@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=66657&edit=1 ID: 66657 Updated by: nikic@php.net Reported by: thomas dot hebinck at digionline dot de Summary: gmp_init('') throws warning -Status: Open +Status: Not a bug Type: Feature/Change Request Package: GNU MP related Operating System: Linux PHP Version: 5.6Git-2014-02-06 (snap) Block user comment: N Private report: N New Comment: gmp_init('') did not return a GMP zero, but boolean false, indicating an error condition. PHP 5.6 adds a warning for that previously silent error. Previous Comments: ------------------------------------------------------------------------ [2014-02-06 15:45:58] thomas dot hebinck at digionline dot de Description: ------------ Up to PHP 5.5.9 gmp_init() called with an empty string as argument had the same result as called with a zero. In PHP 5.6 Alpha 1 (and the current snapshot) this call throws a warning. This breaks existing code. Test script: --------------- echo gmp_strval(gmp_init('')); Expected result: ---------------- "0" Actual result: -------------- Warning: gmp_init() [function.gmp-init.php]: Unable to convert variable to GMP - string is not an integer in /SPACE/ww3/www/wws/130009.php(103) : eval()'d code on line 1 "0" ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=66657&edit=1

« previous php.bugs (#184191) next »