Ver Fonte

json_decode fallback bug 2

Alexandre Alapetite há 10 anos atrás
pai
commit
bd47d14a53
1 ficheiros alterados com 2 adições e 2 exclusões
  1. 2 2
      lib/lib_rss.php

+ 2 - 2
lib/lib_rss.php

@@ -1,9 +1,9 @@
 <?php
 <?php
 if (!function_exists('json_decode')) {
 if (!function_exists('json_decode')) {
 	require_once('JSON.php');
 	require_once('JSON.php');
-	function json_decode($var, $assoc) {
+	function json_decode($var, $assoc = false) {
 		$JSON = new Services_JSON($assoc ? SERVICES_JSON_LOOSE_TYPE : 0);
 		$JSON = new Services_JSON($assoc ? SERVICES_JSON_LOOSE_TYPE : 0);
-		return $JSON->decode($var, $assoc);
+		return $JSON->decode($var);
 	}
 	}
 }
 }