On Mon, 2008-12-08 at 12:36 +0000, "Jani Taskinen" wrote: 
> +// If __DIR__ is not defined, define it
> +if (!defined('__DIR__')) {

defined() will always return true ...

> +     define('__DIR__', realpath(dirname(__FILE__)));

... but this will never throw an error.

$ sapi/cli/php -d error_reporting=E_ALL \
   -r 'var_dump(__DIR__); var_dump(defined("__DIR__")); 
var_dump(define("__DIR__", 32));'
string(39) "/home/johannes/src/php/5.3/debug-notsrm"
bool(false)
bool(true)

Maybe it's better to check for the version there ...

johannes


-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to