Merge pull request #4780 from tianhe1986/develop_standard_hex2bin

[ci skip] Trigger error for "resource" type in hex2bin() inputs
diff --git a/system/core/compat/standard.php b/system/core/compat/standard.php
index c839c9b..6b7caa4 100644
--- a/system/core/compat/standard.php
+++ b/system/core/compat/standard.php
@@ -153,7 +153,7 @@
 	 */
 	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'))
 			{