PHP Classes

Fix warnings related to incomplete explode's

Recommend this page to a friend!

      CSS parser  >  All threads  >  Fix warnings related to incomplete...  >  (Un) Subscribe thread alerts  
Subject:Fix warnings related to incomplete...
Summary:Fix warnings related to incomplete explode's
Messages:1
Author:tom
Date:2012-08-30 22:47:51
 

  1. Fix warnings related to incomplete...   Reply   Report abuse  
Picture of tom tom - 2012-08-30 22:47:51
Lines like
list($codekey, $codevalue) = explode(":",$code);
spit a warning when the explode doesn't create enough variables.

Easy fix: append '+ array(null,null)'

e.g.
list($codekey, $codevalue) = explode(":",$code) + array(null,null);