Fix running test.php on a bootstrapped Horde installation.
authorJan Schneider <jan@horde.org>
Wed, 15 Dec 2010 22:46:19 +0000 (22:46 +0000)
committerJan Schneider <jan@horde.org>
Wed, 15 Dec 2010 22:46:19 +0000 (22:46 +0000)
horde/test.php

index 39cdea8..5b14f82 100644 (file)
@@ -86,7 +86,7 @@ if (!class_exists($classname)) {
 $test_ob = new $classname();
 
 /* Register a session. */
-if (!$session->exists('horde', 'test_count')) {
+if ($session && !$session->exists('horde', 'test_count')) {
     $session->set('horde', 'test_count', 0);
 }
 
@@ -94,7 +94,7 @@ if (!$session->exists('horde', 'test_count')) {
 $test_templates = HORDE_TEMPLATES . '/test';
 
 /* Self URL. */
-$url = Horde::selfUrl();
+$url = Horde::url('test.php');
 $self_url = $url->copy()->add('app', $app);
 
 /* Handle special modes. */