diff options
author | Cosmin Atanasiu <innorogue@gmail.com> | 2012-05-02 05:41:46 +0200 |
---|---|---|
committer | Cosmin Atanasiu <innorogue@gmail.com> | 2012-05-02 05:41:46 +0200 |
commit | 3259e98b2b775d6dd932e03ae37b08c6e0465898 (patch) | |
tree | 7beecc35139eec7258ac256bc51c7899a6ef48f8 /system/libraries/Javascript.php | |
parent | 0b10a8c71cd8a60281f8dbe872ae4ba0404ac2c3 (diff) |
Update system/libraries/Javascript.php
Diffstat (limited to 'system/libraries/Javascript.php')
-rw-r--r-- | system/libraries/Javascript.php | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/system/libraries/Javascript.php b/system/libraries/Javascript.php index 008136192..dd2df697c 100644 --- a/system/libraries/Javascript.php +++ b/system/libraries/Javascript.php @@ -723,14 +723,7 @@ class CI_Javascript { { if (is_object($result)) { - if (is_callable( array( $result, "result_array" ) )) - { - $json_result = $result->result_array(); - } - else - { - $json_result = (array)$result; - } + $json_result = is_callable(array($result, 'result_array')) ? $result->result_array() : (array) $result; } elseif (is_array($result)) { |