From fc90a7b66df97db1fa0c792759118119836cb7ed Mon Sep 17 00:00:00 2001 From: Cosmin Atanasiu Date: Mon, 23 Apr 2012 20:56:37 -0700 Subject: Update system/libraries/Javascript.php --- system/libraries/Javascript.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'system') diff --git a/system/libraries/Javascript.php b/system/libraries/Javascript.php index 629a3adfe..21c9e11bd 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 = (array)$result; } elseif (is_array($result)) { -- cgit v1.2.3-24-g4f1b From a5918ebb5354f6e8bea0149fd95fc98412d461eb Mon Sep 17 00:00:00 2001 From: Cosmin Atanasiu Date: Mon, 30 Apr 2012 22:46:20 -0700 Subject: Update system/libraries/Javascript.php --- system/libraries/Javascript.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'system') 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)) { -- cgit v1.2.3-24-g4f1b From 0b10a8c71cd8a60281f8dbe872ae4ba0404ac2c3 Mon Sep 17 00:00:00 2001 From: Cosmin Atanasiu Date: Mon, 30 Apr 2012 22:51:17 -0700 Subject: Update system/libraries/Javascript.php --- system/libraries/Javascript.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'system') diff --git a/system/libraries/Javascript.php b/system/libraries/Javascript.php index b56dd9888..008136192 100644 --- a/system/libraries/Javascript.php +++ b/system/libraries/Javascript.php @@ -723,14 +723,14 @@ class CI_Javascript { { if (is_object($result)) { - if (is_callable( array( $result, "result_array" ) )) - { - $json_result = $result->result_array(); - } - else - { - $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)) { -- cgit v1.2.3-24-g4f1b From 3259e98b2b775d6dd932e03ae37b08c6e0465898 Mon Sep 17 00:00:00 2001 From: Cosmin Atanasiu Date: Tue, 1 May 2012 20:41:46 -0700 Subject: Update system/libraries/Javascript.php --- system/libraries/Javascript.php | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'system') 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)) { -- cgit v1.2.3-24-g4f1b