From 2fae66e54bac9104acb2236aeffec80d1c794c4d Mon Sep 17 00:00:00 2001 From: Greg Aker Date: Thu, 9 Dec 2010 15:49:34 -0600 Subject: Fix #260 - tightening up the is_ajax_request() method in the Input class. Thanks sophistry for the suggestion --- system/core/Input.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'system/core/Input.php') diff --git a/system/core/Input.php b/system/core/Input.php index 6f88b1972..9d8811cdd 100644 --- a/system/core/Input.php +++ b/system/core/Input.php @@ -635,8 +635,7 @@ class CI_Input { */ public function is_ajax_request() { - $req_source = $this->server('HTTP_X_REQUESTED_WITH'); - return ($req_source == 'XMLHttpRequest') ? TRUE : FALSE; + return ($this->server('HTTP_X_REQUESTED_WITH') === 'XMLHttpRequest'); } } -- cgit v1.2.3-24-g4f1b