#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:
shadlaws
2013-03-02 13:25:10 +01:00
parent 0d05e91cd3
commit 9b9f1a7b07
16 changed files with 32 additions and 76 deletions
+1 -1
View File
@@ -27,7 +27,7 @@ class Html_Helper_Test extends Gallery_Unit_Test_Case {
public function purify_test() {
$safe_string = html::purify("hello <p >world</p>");
$expected = method_exists("purifier", "purify")
$expected = (class_exists("purifier") && method_exists("purifier", "purify"))
? "hello <p>world</p>"
: "hello &lt;p &gt;world&lt;/p&gt;";
$this->assert_equal($expected, $safe_string->unescaped());