aboutsummaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
Diffstat (limited to 'engine')
-rw-r--r--engine/lib/elgglib.php2
-rw-r--r--engine/tests/api/helpers.php4
2 files changed, 3 insertions, 3 deletions
diff --git a/engine/lib/elgglib.php b/engine/lib/elgglib.php
index a800aca7a..6c94133df 100644
--- a/engine/lib/elgglib.php
+++ b/engine/lib/elgglib.php
@@ -400,7 +400,7 @@ function elgg_get_loaded_external_files($type, $location) {
if (isset($CONFIG->externals) && isset($CONFIG->externals[$type])) {
$items = array_values($CONFIG->externals[$type]);
- $callback = "return \$v->loaded == true && \$v->location == $location;";
+ $callback = "return \$v->loaded == true && \$v->location == '$location';";
$items = array_filter($items, create_function('$v', $callback));
if ($items) {
usort($items, create_function('$a,$b','return $a->priority >= $b->priority;'));
diff --git a/engine/tests/api/helpers.php b/engine/tests/api/helpers.php
index 1362b3c9d..461627547 100644
--- a/engine/tests/api/helpers.php
+++ b/engine/tests/api/helpers.php
@@ -109,7 +109,7 @@ class ElggCoreHelpersTest extends ElggCoreUnitTest {
$this->assertIdentical('http://test1.com', $CONFIG->externals['js']['key']->url);
// send a bad url
- $result = elgg_register_js();
+ $result = @elgg_register_js('bad');
$this->assertFalse($result);
}
@@ -140,7 +140,7 @@ class ElggCoreHelpersTest extends ElggCoreUnitTest {
$result = elgg_unregister_js('id1');
$this->assertTrue($result);
- $this->assertNULL($CONFIG->externals['js']['head']['id1']);
+ @$this->assertNULL($CONFIG->externals['js']['head']['id1']);
$result = elgg_unregister_js('id1');
$this->assertFalse($result);