You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PHP Warning: Decimal\Decimal::__construct() expects exactly 1 parameter, 2 given in /app/public/index1.php on line 8 PHP Warning: Decimal\Decimal::__construct() expects exactly 1 parameter, 2 given in /app/public/index1.php on line 9 Assertion failed: dec->len > 0 (mpdecimal.c: mpd_msword: 216)
Thread 1 "php" received signal SIGABRT, Aborted.
0x00007ffff7db2f1b in __restore_sigs () from /lib/ld-musl-x86_64.so.1
(gdb) bt
#0 0x00007ffff7db2f1b in __restore_sigs () from /lib/ld-musl-x86_64.so.1 #1 0x00007ffff7db3035 in raise () from /lib/ld-musl-x86_64.so.1 #2 0x0000000000000000 in ?? ()
`
Without 2nd parameter
use Decimal\Decimal;
$a = new Decimal("1");
$b = new Decimal("7");
print_r($a / $b);`
@vishalmelmatti Do your tests pass when you build this project and run make test? The __construct tests clearly test passing zero, one or two arguments. Therefore, I am at a loss how Decimal\Decimal::__construct() expects exactly 1 parameter, 2 given can be possible.
If you could share a Dockerfile that demonstrates this bug I will be happy to look closer. In the meantime, I will focus on more recent issues and release maintenance. I apologize for not coming back to this sooner.
HI,
I am trying to use this extension on PHP 7.2.26 and Alpine 3.8 docker image.
This example code from documentation https://php-decimal.io/#basic-usage gives error
PHP Warning: Decimal\Decimal::__construct() expects exactly 1 parameter, 2 given in /app/public/index1.php on line 8 PHP Warning: Decimal\Decimal::__construct() expects exactly 1 parameter, 2 given in /app/public/index1.php on line 9 Assertion failed: dec->len > 0 (mpdecimal.c: mpd_msword: 216)
Trace:
`[New LWP 124]
[New LWP 125]
[New LWP 126]
Assertion failed: dec->len > 0 (mpdecimal.c: mpd_msword: 216)
Thread 1 "php" received signal SIGABRT, Aborted.
0x00007ffff7db2f1b in __restore_sigs () from /lib/ld-musl-x86_64.so.1
(gdb) bt
#0 0x00007ffff7db2f1b in __restore_sigs () from /lib/ld-musl-x86_64.so.1
#1 0x00007ffff7db3035 in raise () from /lib/ld-musl-x86_64.so.1
#2 0x0000000000000000 in ?? ()
`
Without 2nd parameter
gives this error
Assertion failed: dec->len > 0 (mpdecimal.c: mpd_msword: 216)
The text was updated successfully, but these errors were encountered: