Replace is_null() with === / !== NULL
Exact same behavior, but faster. I also think it's more readable.
diff --git a/system/libraries/User_agent.php b/system/libraries/User_agent.php
index 542deb7..1f4b2fa 100644
--- a/system/libraries/User_agent.php
+++ b/system/libraries/User_agent.php
@@ -158,7 +158,7 @@
$this->agent = trim($_SERVER['HTTP_USER_AGENT']);
}
- if ( ! is_null($this->agent) && $this->_load_agent_file())
+ if ($this->agent !== NULL && $this->_load_agent_file())
{
$this->_compile_data();
}