Wrong regex read from DB

Scans for, and displays main/alt relations in your Guild

Moderator: PleegWat

Wrong regex read from DB

Postby Sylna » Sat Mar 10, 2007 11:59 pm

I just explored a crazy bug. The regex-statement in den DB ist as phpMyAdmin says: "/alt ([\pL]+)/i". And thats exactly what i want, allright so far. But I wondered why all chars in my guild became Mains and have done some echo debugging.

What i found out is, that $addon_conf['AltMonitor']['getmain_regex'] in the update.php returns "alt ([pL]+)/i" and the "\" in "\pL" ist missing. As a workaround I hardcoded my regex-statement in the code and everything was fine and detected correct.

Anyone an idea why $addon_conf['AltMonitor']['getmain_regex'] kicks the "\" in the regex-statement?

Wrong regex read from DB

Postby PleegWat » Sun Mar 11, 2007 11:13 am

It works fine if you set it in the config, but it's slashed an extra time in DB. So if it's /alt ([\\pL]+)/i it'll show up correctly in config, and it'll work.
I <3 /bin/bash
User avatar
WoWRoster.net Dev Team
WoWRoster.net Dev Team
Posts: 1636
Joined: Tue Jul 04, 2006 1:43 pm

Wrong regex read from DB

Postby Sylna » Mon Mar 12, 2007 1:04 am

That's it. Thanks a lot.

Return to AltMonitor

Who is online

Users browsing this forum: No registered users and 0 guests