mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-06-04 02:39:08 -04:00
#2031 - Add class_exists() before method_exists() if class existence is unknown.
- fixed all instances of this in core code - deleted previous Zend Guard Loader workaround in MY_Kohana.php - updated Bootstrap.php to reflect deleted MY_Kohana.php
This commit is contained in:
@@ -91,7 +91,7 @@ class SafeString_Test extends Gallery_Unit_Test_Case {
|
||||
|
||||
public function purify_test() {
|
||||
$safe_string = SafeString::purify("hello <p >world</p>");
|
||||
$expected = method_exists("purifier", "purify")
|
||||
$expected = (class_exists("purifier") && method_exists("purifier", "purify"))
|
||||
? "hello <p>world</p>"
|
||||
: "hello <p >world</p>";
|
||||
$this->assert_equal($expected, $safe_string);
|
||||
@@ -100,7 +100,7 @@ class SafeString_Test extends Gallery_Unit_Test_Case {
|
||||
public function purify_twice_test() {
|
||||
$safe_string = SafeString::purify("hello <p >world</p>");
|
||||
$safe_string_2 = SafeString::purify($safe_string);
|
||||
$expected = method_exists("purifier", "purify")
|
||||
$expected = (class_exists("purifier") && method_exists("purifier", "purify"))
|
||||
? "hello <p>world</p>"
|
||||
: "hello <p >world</p>";
|
||||
$this->assert_equal($expected, $safe_string_2);
|
||||
|
||||
Reference in New Issue
Block a user