Getting rid of PHP Warnings
This commit is contained in:
parent
a0229c48d6
commit
e2ca126d56
5 changed files with 44 additions and 44 deletions
|
@ -121,7 +121,7 @@ class config_panel extends admin_module{
|
|||
return $text;
|
||||
}
|
||||
|
||||
if(strstr($option,"wysiwyg")){
|
||||
if(str_contains($option, "wysiwyg")){
|
||||
$string=str_replace("wysiwyg(","",substr($option, 0, -1));
|
||||
$sarr=explode(";",$string);
|
||||
foreach($sarr as $str){
|
||||
|
@ -137,15 +137,15 @@ class config_panel extends admin_module{
|
|||
return $text;
|
||||
}
|
||||
|
||||
if(strstr($option,"textarea")){
|
||||
if(str_contains($option, "textarea")){
|
||||
$string=str_replace("textarea(","",substr($option, 0, -1));
|
||||
$sarr=explode(";",$string);
|
||||
foreach($sarr as $str){
|
||||
$substr=explode("|",$str);
|
||||
$a_name[]=$substr[0];
|
||||
$value[]=$substr[1];
|
||||
}
|
||||
if(is_array($sarr)){
|
||||
if(count($sarr)>1) {
|
||||
foreach ($sarr as $str) {
|
||||
$substr = explode("|", $str);
|
||||
$a_name[] = $substr[0];
|
||||
$value[] = $substr[1];
|
||||
}
|
||||
$text=$panel->textarea(array("name"=>$name,"value"=>$config[$name], $a_name[0]=>$value[0],$a_name[1]=>$value[1]),"",TRUE);
|
||||
}else{
|
||||
$text=$panel->textarea(array("name"=>$name,"value"=>$config[$name]),"",TRUE);
|
||||
|
@ -153,7 +153,7 @@ class config_panel extends admin_module{
|
|||
return $text;
|
||||
}
|
||||
|
||||
if(strstr($option,"select")){
|
||||
if(str_contains($option, "select")){
|
||||
//$text=$panel->field("text",$name,"value=\"".$config[$name]."\"",TRUE);
|
||||
$string=str_replace("select(","",substr($option, 0, -1));
|
||||
$sarr=explode(";",$string);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue