commit 8d70443053e501c5ccb5dca2d8cc72f046898174
parent bf1748c339b5dd240661344a6bc0930336ac8f29
Author: dankert <devnull@localhost>
Date: Mon, 5 Nov 2007 21:56:07 +0100
Benutzen von Http::sendStatus(), wenn etwas schiefgeht.
Diffstat:
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/serviceClasses/Preferences.class.php b/serviceClasses/Preferences.class.php
@@ -11,7 +11,8 @@ class Preferences
{
function load( $dir='' )
{
- define('QUOTE','"');
+ if ( !defined('QUOTE') )
+ define('QUOTE','"');
$values = array();
@@ -25,7 +26,10 @@ class Preferences
}
if ( !is_dir($dir) )
- die('not a directory: '.$dir);
+ {
+ Http::sendStatus(501,'Internal Server Error','not a directory: '.$dir);
+ exit;
+ }
if ( $dh = opendir($dir) )
{