Better message if param not defined

This commit is contained in:
Laurent Destailleur 2012-08-10 03:46:17 +02:00
parent 8e16581e7f
commit 4250dedf60

View File

@ -95,10 +95,8 @@ else
if (preg_match('/mysql/i',$db->type)) if (preg_match('/mysql/i',$db->type))
{ {
$arraytest=array( $arraytest=array(
// "character_set_connection"=>'UTF-8', 'character_set_database'=>array('var'=>'dolibarr_main_db_character_set','valifempty'=>'utf8'),
'character_set_database'=>'dolibarr_main_db_character_set', 'collation_database'=>array('var'=>'dolibarr_main_db_collation','valifempty'=>'utf8_general_ci')
// 'collation_connection'=>"UTF-8",
'collation_database'=>'dolibarr_main_db_collation'
); );
} }
@ -118,7 +116,8 @@ else
foreach($arraytest as $key => $val) foreach($arraytest as $key => $val)
{ {
if ($key != $row[0]) continue; if ($key != $row[0]) continue;
$text='Should be in line with value of param <b>'.$val.'</b> thas is <b>'.${$val}.'</b>'; $val2=${$val['var']};
$text='Should be in line with value of param <b>'.$val['var'].'</b> thas is <b>'.($val2?$val2:"'' (=".$val['valifempty'].")").'</b>';
$show=1; $show=1;
} }
if ($show==0) print $row[1]; if ($show==0) print $row[1];