I am download the EA CSV 1.2.6.4 install with ZC 1.5.5b
it log some PHP PHP Deprecated: Function ereg_replace() is deprecated () on line 879
where line 879 is
$products_image_base = ereg_replace($products_image_extension . '$', '', $products_image);
so I try to fix this by replace the ereg_replace to preg_replace
Here are the coding range
from
PHP Code:
$products_image = (($result->fields['v_products_image'] == PRODUCTS_IMAGE_NO_IMAGE) ? '' : $result->fields['v_products_image']);
$products_image_extension = substr($products_image, strrpos($products_image, '.'));
$products_image_base = ereg_replace($products_image_extension . '$', '', $products_image);
change to
PHP Code:
$products_image = (($result->fields['v_products_image'] == PRODUCTS_IMAGE_NO_IMAGE) ? '' : $result->fields['v_products_image']);
$products_image_extension = substr($products_image, strrpos($products_image, '.'));
$products_image_base = preg_replace($products_image_extension . '$', '', $products_image);
Then I download the CSV, this time saw other new error in the log that ereg_replace() gone
PHP Warning: preg_replace(): No ending delimiter '.' found in /store/admin/easypopulate.php on line 879
PHP Warning: preg_replace(): No ending delimiter '$' found in /store/admin/easypopulate.php on line 879
Thank you
Bookmarks