New Zenner
- Join Date:
- Feb 2007
- Posts:
- 6
- Plugin Contributions:
- 0
[Done v1.3.8] Image filename not saved in product table
Version 1.3.7
This is not necessarily a bug, but an inconvenience -- the image filename (products_image) is not saved in the products table if the string "none" appears anywhere in the filename. So, for example, "none-of_the_above.jpg" would not be saved even though it is shown on the preview page. The user is not alerted.
The code that causes this is in admin/includes/modules/update_product.php on line 57:
if (isset($_POST['products_image']) && zen_not_null($_POST['products_image']) && (!is_numeric(strpos($_POST['products_image'],'none'))) ) {
I have no suggestion for a fix, since I don't know the reasoning for going to this line from the previous, which only checked if the full name was "none".
The test Was: $_POST['products_image'] != 'none'
The test Is: !is_numeric(strpos($_POST['products_image'],'none'))