svn[1298] - " Guerrier" - php error

Posts from previous Beta sessions

svn[1298] - " Guerrier" - php error

Postby tuigii » Mon Sep 03, 2007 9:46 pm

Have a look at this page :
http://www.les-grands-croises.fr/roster ... &member=97
3 php errors : the class type "Guerrier" (Warrior in frFR) isn't know (or it is present in the frFR.php : line 395.

What happens is that the array is indexed with the value " Guerrier" (go figure). There is a space in front of it.
So, I had to throw in a trim()... like this :
Code: Select all
    $html .= '<span style="color:#'$roster->locale->wordings[$this->locale]['class_colorArray'][trim($class)] . ';">' $class '</span>'

[line 365 - file lib/item.php]

This must be a localized related error - but I doubt a bad CP.lua format : I saw this on 2 different Guilds that use svn[1298] right now.
My own perso (also a Warrior on a different Guild / Roster) had the same error.
=> http://www.papy-team.fr/roster_20b1/ind ... &member=23

I put in a echo "[--->]".$class."[<---]"; on line 364, so you can see what happens !
The trim is there (for this Guild) : so no error
Last edited by tuigii on Tue Sep 04, 2007 4:58 am, edited 1 time in total.
User avatar
tuigii
WR.net Master
WR.net Master
 
Posts: 891
Joined: Wed Dec 27, 2006 12:57 pm
Location: Somewhere in the South Ouest of France

svn[1298] - " Guerrier" - php error

Postby ds » Tue Sep 04, 2007 2:21 am

I changed the pattern for matching classes in the last build. It looks like its capturing the leading space by mistake. The trim works, but I think I'll fix the pattern because this is used in two places. Thanks for the report!
Image
ds
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 297
Joined: Sat Jul 08, 2006 9:58 am

svn[1298] - " Guerrier" - php error

Postby ds » Tue Sep 04, 2007 4:54 am

Reverted to the Pattern before; am I safe to assume it was working before this last change?

Code: Select all
$lang['tooltip_preg_classes']='/^(Classes.+) (.+)/'; // text for class restricted items


[Fixed in SVN: 1299]
Last edited by ds on Tue Sep 04, 2007 4:58 am, edited 1 time in total.
Image
ds
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 297
Joined: Sat Jul 08, 2006 9:58 am

svn[1298] - " Guerrier" - php error

Postby ds » Tue Sep 04, 2007 5:03 am

Whoops looks like Race items will suffer the same mistake... (now it is clear why I made the patterns like that in the first place! -- hehe)

That'll be fixed too...
Image
ds
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 297
Joined: Sat Jul 08, 2006 9:58 am

Re: svn[1298] - " Guerrier" - php error

Postby tuigii » Tue Sep 04, 2007 6:44 am

ds wrote:Reverted to the Pattern before; am I safe to assume it was working before this last change?

It was :wink:
User avatar
tuigii
WR.net Master
WR.net Master
 
Posts: 891
Joined: Wed Dec 27, 2006 12:57 pm
Location: Somewhere in the South Ouest of France


Return to Archived

Who is online

Users browsing this forum: No registered users and 0 guests

cron