diff --git a/inc/auth.php b/inc/auth.php
index 33626cf80a93467a65ecb845fc9647ffab99ddc1..6804c269648fa0e1b2ab22a14fac43232502db50 100644
--- a/inc/auth.php
+++ b/inc/auth.php
@@ -931,7 +931,7 @@ function auth_cryptPassword($clear,$method='',$salt=null){
             $magic = '1';
         case 'apr1':
             //from http://de.php.net/manual/en/function.crypt.php#73619 comment by <mikey_nich at hotmail dot com>
-            if(!$magic) $magic = 'apr1';
+            if(!defined($magic)) $magic = 'apr1';
             $salt = substr($salt,0,8);
             $len = strlen($clear);
             $text = $clear.'$'.$magic.'$'.$salt;