Replace is_null() with === / !== NULL
Exact same behavior, but faster. I also think it's more readable.
diff --git a/system/libraries/Javascript.php b/system/libraries/Javascript.php
index 542a0ec..7f1d855 100644
--- a/system/libraries/Javascript.php
+++ b/system/libraries/Javascript.php
@@ -737,7 +737,7 @@
{
// JSON data can optionally be passed to this function
// either as a database result object or an array, or a user supplied array
- if ( ! is_null($result))
+ if ($result !== NULL)
{
if (is_object($result))
{
@@ -823,7 +823,7 @@
*/
protected function _prep_args($result, $is_key = FALSE)
{
- if (is_null($result))
+ if ($result === NULL)
{
return 'null';
}