Skip to content

Commit e86ecc9

Browse files
author
Phil Sturgeon
committed
Patched to work better with CI 2. Input vrs Security.
1 parent b6df2b5 commit e86ecc9

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

application/libraries/REST_Controller.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,15 @@ public function delete($key = NULL, $xss_clean = TRUE)
479479

480480
private function _xss_clean($val, $bool)
481481
{
482-
return $bool ? $this->input->xss_clean($val) : $val;
482+
if(CI_VERSION < 2)
483+
{
484+
return $bool ? $this->input->xss_clean($val) : $val;
485+
}
486+
487+
else
488+
{
489+
return $bool ? $this->security->xss_clean($val) : $val;
490+
}
483491
}
484492

485493
// SECURITY FUNCTIONS ---------------------------------------------------------

0 commit comments

Comments
 (0)