commit | a5918ebb5354f6e8bea0149fd95fc98412d461eb | [log] [tgz] |
---|---|---|
author | Cosmin Atanasiu <innorogue@gmail.com> | Mon Apr 30 22:46:20 2012 -0700 |
committer | Cosmin Atanasiu <innorogue@gmail.com> | Mon Apr 30 22:46:20 2012 -0700 |
tree | 6902704e1493bc395d6c945a48ae076b97ec7798 | |
parent | fc90a7b66df97db1fa0c792759118119836cb7ed [diff] |
Update system/libraries/Javascript.php
diff --git a/system/libraries/Javascript.php b/system/libraries/Javascript.php index 21c9e11..b56dd98 100644 --- a/system/libraries/Javascript.php +++ b/system/libraries/Javascript.php
@@ -723,7 +723,14 @@ { 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)) {