diff --git a/system/CodeIgniter.php b/system/CodeIgniter.php index 4e694c6fa2a5..4222c336b300 100644 --- a/system/CodeIgniter.php +++ b/system/CodeIgniter.php @@ -968,6 +968,17 @@ protected function gatherOutput($cacheConfig = null, $returned = null) */ public function storePreviousURL($uri) { + // Ignore CLI requests + if (is_cli()) + { + return; + } + // Ignore AJAX requests + if (method_exists($this->request, 'isAJAX') && $this->request->isAJAX()) + { + return; + } + // This is mainly needed during testing... if (is_string($uri)) {