Closed jorgeelmundoso closed 4 years ago
https://github.com/monero-integrations/monerophp/blob/68900c3a8699aa24083cb9d05e3f492c99e07d4d/src/base58.php#L181-L185
please see
http://sandbox.onlinephpfunctions.com/code/bbb3f59200711389962f0860e7df3b826a810c4b
Your input validation is always true, so you don't catch unwanted types.
use https://www.php.net/manual/en/function.is-float.php and https://www.php.net/manual/en/function.is-int.php
Thanks! I'll commit a fix soon!
https://github.com/monero-integrations/monerophp/blob/aa7aea745f7b86e468dc9d2a75abb4ecbc305145/src/base58.php#L374-L393
isn't haystack supposed to be an array here ?
And maybe add a small test.
https://github.com/monero-integrations/monerophp/blob/68900c3a8699aa24083cb9d05e3f492c99e07d4d/src/base58.php#L181-L185
please see
http://sandbox.onlinephpfunctions.com/code/bbb3f59200711389962f0860e7df3b826a810c4b
Your input validation is always true, so you don't catch unwanted types.
use https://www.php.net/manual/en/function.is-float.php and https://www.php.net/manual/en/function.is-int.php