mirror of
https://github.com/php/php-src.git
synced 2024-09-24 11:27:28 +00:00
- make the test more obvious and add an explanation
This commit is contained in:
parent
9941fd7185
commit
5016f0d0e9
@ -1824,8 +1824,10 @@ static EVP_PKEY * php_openssl_evp_from_zval(zval ** val, int public_key, char *
|
|||||||
return NULL;
|
return NULL;
|
||||||
} else {
|
} else {
|
||||||
/* force it to be a string and check if it refers to a file */
|
/* force it to be a string and check if it refers to a file */
|
||||||
if (Z_TYPE_PP(val) == IS_LONG || Z_TYPE_PP(val) == IS_BOOL
|
/* passing non string values leaks, object uses toString, it returns NULL
|
||||||
|| Z_TYPE_PP(val) == IS_ARRAY) {
|
* bug38255.phpt
|
||||||
|
*/
|
||||||
|
if (!(Z_TYPE_PP(val) == IS_STRING || Z_TYPE_PP(val) == IS_OBJECT)) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
convert_to_string_ex(val);
|
convert_to_string_ex(val);
|
||||||
|
Loading…
Reference in New Issue
Block a user