Author Topic: prefs.php Error  (Read 3094 times)

Patti

  • Newbie
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
prefs.php Error
« on: October 12, 2012, 08:33:10 pm »
I have Error on prefs ( Einstellungen der User)
Tschuldigung mein englisch ist nicht so gut :

Code: [Select]
PHP Warnung: "explode() expects parameter 2 to be string, array given"
in /home/domains/lotgd.aszlig.net/prefs.php bei 347.
Call Stack:
2: explode(",", Array(

    0=>"Has the player been bless...", 1=>"`$Ramius"

)) called from /home/domains/lotgd.aszlig.net/prefs.php on line 347


Code: [Select]
PHP Warnung: "explode() expects parameter 2 to be string, array given"
in /home/domains/lotgd.aszlig.net/prefs.php bei 347.
Call Stack:
2: explode(",", Array(

    0=>"Has the player been curse...", 1=>"`$Ramius"

)) called from /home/domains/lotgd.aszlig.net/prefs.php on line 347

:-/

Patti

  • Newbie
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Re: prefs.php Error
« Reply #1 on: October 17, 2012, 06:35:27 pm »
fix for Problem : (thx by dragonprime)

open prefs.php

search :
Code: [Select]
if (is_array($val)) {
$v = $val[0];
$x = explode("|", $v);
$val[0] = $x[0];
$x[0] = $val;
} else {
$x = explode("|", $val);
}

search :          
Code: [Select]
$type = explode(",", $x[0]);
if (isset($type[1])) $type = trim($type[1]);
else $type = "string";

replaced :

Code: [Select]
if(is_array($x[0])) $x[0] = call_user_func_array('sprintf', $x[0]);
$type = split(",", $x[0]);
if (isset($type[1])) $type = trim($type[1]);
else $type = "string";




Nightborn

  • Administrator
  • Sr. Member
  • *****
  • Posts: 320
  • Karma: +20/-0
    • View Profile
    • Shinobilegends
Re: prefs.php Error
« Reply #2 on: October 30, 2012, 07:37:19 am »
As this is working for me, I wonder where it comes from :P

Sounds like support for new modules? Never had that error to my knowledge. (Prefs is an old file that would need overhaul anyhow)
It should be fixed, but it won't be easy and it won't be fast. If you want
to help - wonderful. But keep in mind that it will take months of wading
through the ugliest code we have in the tree. If you've got a weak stomach -
stay out. I've been there and it's not a nice place.

   - Al Viro