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
Deprecated: Function mcrypt_create_iv() is deprecated in /Users/bruce/www/personal/PicUploader/vendor/kunalvarma05/dropbox-php-sdk/src/Dropbox/Security/McryptRandomStringGenerator.php on line 47
this issue also mentioned almost 3 years ago: #29, but didn't fix yet.
I've fixed this issue, there is a function generateString($length) in file vendor/kunalvarma05/dropbox-php-sdk/src/Dropbox/Security/McryptRandomStringGenerator.php:
Before fix:
publicfunctiongenerateString($length)
{
//Create Binary String$binaryString = mcrypt_create_iv($length, MCRYPT_DEV_URANDOM);
//Unable to create binary stringif ($binaryString === false) {
thrownewDropboxClientException(
static::ERROR_MESSAGE .
'mcrypt_create_iv() returned an error.'
);
}
//Convert binary to hexreturn$this->binToHex($binaryString, $length);
}
After fixed:
publicfunctiongenerateString($length)
{
//Create Binary String// $binaryString = mcrypt_create_iv($length, MCRYPT_DEV_URANDOM);$binaryString = random_bytes($length);
//Unable to create binary stringif ($binaryString === false) {
thrownewDropboxClientException(
static::ERROR_MESSAGE .
'mcrypt_create_iv() returned an error.'
);
}
//Convert binary to hexreturn$this->binToHex($binaryString, $length);
}
Deprecated: Function mcrypt_create_iv() is deprecated in /Users/bruce/www/personal/PicUploader/vendor/kunalvarma05/dropbox-php-sdk/src/Dropbox/Security/McryptRandomStringGenerator.php on line 47
this issue also mentioned almost 3 years ago: #29, but didn't fix yet.
I've fixed this issue, there is a function
generateString($length)
in filevendor/kunalvarma05/dropbox-php-sdk/src/Dropbox/Security/McryptRandomStringGenerator.php
:Before fix:
After fixed:
All you need to do is to change
to
The text was updated successfully, but these errors were encountered: