PHP Classes

Bug Report

Recommend this page to a friend!

      CSS parser  >  All threads  >  Bug Report  >  (Un) Subscribe thread alerts  
Subject:Bug Report
Summary:Bug in add method
Messages:2
Author:Paddy
Date:2011-08-03 08:43:20
Update:2012-08-30 22:41:36
 

  1. Bug Report   Reply   Report abuse  
Picture of Paddy Paddy - 2011-08-03 08:43:28
Hi

Thanks you for the class it's saving me a lot of time here. I have uncovered one problem with it though:

In the add method you are exploding $code by semi-colon. Problem is there is a valid reason why $code could contain more than one semi-colon. For example if specifying an absolute URL for a background image.

I've changed line 106 to:

list($codekey, $codevalue) = preg_split('/:/', $code, 2);

And that seems to fix the problem.

Just thought I'd let you know.

Cheers
Paddy

  2. Re: Bug Report   Reply   Report abuse  
Picture of tom tom - 2012-08-30 22:41:36 - In reply to message 1 from Paddy
list($codekey, $codevalue) = explode(":",$code,2)
would do it.