diff options
Diffstat (limited to 'system/libraries')
-rw-r--r-- | system/libraries/Javascript.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/system/libraries/Javascript.php b/system/libraries/Javascript.php index 629a3adfe..dd2df697c 100644 --- a/system/libraries/Javascript.php +++ b/system/libraries/Javascript.php @@ -723,7 +723,7 @@ class CI_Javascript { { if (is_object($result)) { - $json_result = $result->result_array(); + $json_result = is_callable(array($result, 'result_array')) ? $result->result_array() : (array) $result; } elseif (is_array($result)) { |