summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2016-08-22 13:13:54 +0200
committerGitHub <noreply@github.com>2016-08-22 13:13:54 +0200
commit0397eec4c8bc931f33a254c54351ff54c4cd02a9 (patch)
treed1348abf55bae466321309453eb4c3517504a3b4
parentd9c1100a489969c4012057eeeaa6a9de6d250a43 (diff)
parentaed367157d396c8320e278d74227664e0af43d51 (diff)
Merge pull request #4780 from tianhe1986/develop_standard_hex2bin
[ci skip] Trigger error for "resource" type in hex2bin() inputs
-rw-r--r--system/core/compat/standard.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/system/core/compat/standard.php b/system/core/compat/standard.php
index c839c9bc9..6b7caa485 100644
--- a/system/core/compat/standard.php
+++ b/system/core/compat/standard.php
@@ -153,7 +153,7 @@ if ( ! function_exists('hex2bin'))
*/
function hex2bin($data)
{
- if (in_array($type = gettype($data), array('array', 'double', 'object'), TRUE))
+ if (in_array($type = gettype($data), array('array', 'double', 'object', 'resource'), TRUE))
{
if ($type === 'object' && method_exists($data, '__toString'))
{