Welcome, Guest. Please login or register.
Did you miss your activation email?
May 25, 2012, 03:15:26 PM

Login with username, password and session length
Search:     Advanced search
Interested in joining the WebsiteBaker team?
For more Information read here or on our new website.
155508 Posts in 21711 Topics by 7737 Members
Latest Member: simpleguy
* Home Help Search Login Register
Pages: [1]   Go Down
Print
Author Topic: Bug in class.wb.php  (Read 720 times)
Marcus70

Offline Offline

Posts: 28



« on: August 13, 2009, 04:06:26 PM »

Hello alltogether,

I found a "bug" in class.wb.php. (Well, it's not really a bug, but a use of a routine with a high payload because it causes a call of a regex parser where that's not needed.)

In line 219 of class.wb.php the command split() is used to divide a string into an array of strings containing peaces of the original string. split() is used to extract data fields on basis of a regex as delimiter.

A more suitably routine due to better performance to do that job is explode(). The routine splits fields contained in a string on basis of another string (not a regex - a regex won't even work here!!!) and therefore causes no call of a regex parser.

In fact, split() is even marked as deprecated starting with PHP 5.3.0  shocked So using explode() instead of split() will avoid difficulties in future versions of WebsiteBaker or WebsiteBaker installations on servers using PHP 5.3.0.

Regards,
Marcus

(sorry for my... let's call it "rough" english, but I'm a little bit out of training...)
Logged

...man weiß nie, wie tief eine Pfütze ist, bevor man nicht hineingetreten ist... (Murphy's Law)
Luisehahne
Board Member
Development Team
*****
Offline Offline

Posts: 3145



WWW
« Reply #1 on: August 13, 2009, 04:38:28 PM »

Pls write a ticket on project page

Dietmar
Logged

We are human beings - and nobody is perfect at all.
Pages: [1]   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!