From: Brion Vibber Date: Wed, 22 Sep 2004 11:30:43 +0000 (+0000) Subject: Undo fatal mistake added in revision 1.82. X-Git-Tag: 1.5.0alpha1~1886 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/?a=commitdiff_plain;h=9547377138aac68117e0c69b2be6227b9363aeab;p=lhc%2Fweb%2Fwiklou.git Undo fatal mistake added in revision 1.82. DO NOT die if the skin class isn't found! This breaks maintenance scripts and can cause a user account to be unrecoverable except by SQL manipulation if a previously valid skin name is no longer valid. --- diff --git a/includes/User.php b/includes/User.php index 69e0bc16c0..c474ae37de 100644 --- a/includes/User.php +++ b/includes/User.php @@ -582,11 +582,12 @@ class User { require_once( $IP.'/skins/'.$sn.'.php' ); # Check if we got if not failback to default skin - $sn = 'Skin'.$sn; - if(!class_exists($sn)) { - # FIXME : should we print an error message instead of loading - # standard skin ? Let's die for now. [AV] - die("Class $sn doesn't exist in $IP/skins/$sn.php"); + $className = 'Skin'.$sn; + if( !class_exists( $ClassName ) ) { + # DO NOT die if the class isn't found. This breaks maintenance + # scripts and can cause a user account to be unrecoverable + # except by SQL manipulation if a previously valid skin name + # is no longer valid. $sn = 'SkinStandard'; require_once( $IP.'/skins/Standard.php' ); }