diff options
author | Cosmin Atanasiu <innorogue@gmail.com> | 2012-05-01 07:46:20 +0200 |
---|---|---|
committer | Cosmin Atanasiu <innorogue@gmail.com> | 2012-05-01 07:46:20 +0200 |
commit | a5918ebb5354f6e8bea0149fd95fc98412d461eb (patch) | |
tree | 6902704e1493bc395d6c945a48ae076b97ec7798 /system/libraries | |
parent | fc90a7b66df97db1fa0c792759118119836cb7ed (diff) |
Update system/libraries/Javascript.php
Diffstat (limited to 'system/libraries')
-rw-r--r-- | system/libraries/Javascript.php | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/system/libraries/Javascript.php b/system/libraries/Javascript.php index 21c9e11bd..b56dd9888 100644 --- a/system/libraries/Javascript.php +++ b/system/libraries/Javascript.php @@ -723,7 +723,14 @@ class CI_Javascript { { if (is_object($result)) { - $json_result = (array)$result; + if (is_callable( array( $result, "result_array" ) )) + { + $json_result = $result->result_array(); + } + else + { + $json_result = (array)$result; + } } elseif (is_array($result)) { |