aboutsummaryrefslogtreecommitdiffstats
path: root/tests/security
diff options
context:
space:
mode:
Diffstat (limited to 'tests/security')
-rw-r--r--tests/security/extract_current_page_test.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/security/extract_current_page_test.php b/tests/security/extract_current_page_test.php
index 8e536ee461..c127b69b2b 100644
--- a/tests/security/extract_current_page_test.php
+++ b/tests/security/extract_current_page_test.php
@@ -84,8 +84,13 @@ class phpbb_security_extract_current_page_test extends phpbb_security_test_base
protected function sanitizer($value)
{
+ // Fix for objects passed in phpunit
+ if (is_object($value))
+ {
+ return $value;
+ }
$type_cast_helper = new \phpbb\request\type_cast_helper();
$type_cast_helper->set_var($value, $value, gettype($value), true);
- return $value;
+ return str_replace('&', '&', $value);
}
}