PDA

View Full Version : PHP Deprecated: Function


rharman1306375
07-30-2009, 11:19 AM
I am getting the following message on all the web pages:

PHP Deprecated: Function split() is deprecated in C:\Inetpub\wwwroot\GE_StoreRemote\CSSMenuWriter\cs smw_home\menu.php on line 16.
It shows up in the nav bar at the top of the page, which pushes all the buttons down (ie Home, Products, etc.)

Everything else is working including the MySql db and all php functions.

I am using Dreamweaver CS4 and a testing server running on XP.

Please let me know what I need to do to correct this situation.

Thanks

Ray Borduin
07-30-2009, 11:24 AM
It looks like it is depricated in php 5.3

It appears the solution is to use preg_split() instead.

What is the exact line? I'll help with the correct update.

rharman1306375
07-30-2009, 12:48 PM
Its line 16 in menu.php

$WA_ddsArray = split("/", $WA_thisFile);

or the full set of lines is

}
$WA_ddsArray = split("/", $WA_thisFile);
$WA_dotDotSlash = "";
for ($n=0; $n<sizeof($WA_ddsArray)-1; $n++) {
$WA_dotDotSlash .= "../";
}

Please let me know the specific replacement details - I'm not a PHP guy. Thanks

Ray Borduin
07-30-2009, 12:54 PM
just replace "split" with "explode" in this case. We will try to get an update to address this problem in menu writer as soon as we can test it more thoroughly. Please let us know if you run into any more problems in our tools.

rharman1306375
07-30-2009, 01:05 PM
That worked perfect - thanks