Skip to content

Commit a8afc05

Browse files
committed
Casting coin to empty string in request
Makes PHP 8.1 compatible code. Passing null to non-nullable internal function parameters is deprecated.
1 parent 335508b commit a8afc05

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

CryptAPI/CryptAPI.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ public static function process_callback($_get)
235235
private static function _request($coin, $endpoint, $params = [], $assoc = false)
236236
{
237237
$base_url = Cryptapi::$base_url;
238-
$coin = str_replace('_', '/', $coin);
238+
$coin = str_replace('_', '/', (string) $coin);
239239

240240
if (!empty($params['apikey']) && $endpoint !== 'info') {
241241
$base_url = CryptAPI::$pro_url;

0 commit comments

Comments
 (0)