DivaVocals / zen_Image-Handler

Image Handler 4 is really meant to ease the management of product images (particularly the management of additional product images), and to help improve page performance by optimizing the product images.
GNU General Public License v2.0
7 stars 13 forks source link

admin, product view, concatenated paths / double slashes in url / so file not found error #220

Closed torvista closed 3 years ago

torvista commented 3 years ago

After removing the silence operators. On each page refresh, this warning due to the concatenating of constants.

PHP Warning: getimagesize(D:/FullPathToShop/public_html/tienda-158//tienda-158/bmz_cache/ventureshield/generic_full_kitjpg.image.80x80.jpg): Failed to open stream: No such file or directory in D:\FullPathToShop\public_html\tienda-158\admin\image_handler.php on line 571.

In my PR'ed file this is

            case 'layout_info':
                [$width, $height] = getimagesize(DIR_FS_CATALOG . $selected_image_file);
                $heading[] = [
                    'text' => '<strong>' . TEXT_INFO_IMAGE_INFO . '</strong>'
                ];

As $selected_image_file traces back to the class....I'll step further back.

lat9 commented 3 years ago

I'm having a hard time replicating this. What action is being performed when the warning is logged?

drbyte commented 3 years ago

Given that the path is repeated, is it a DIR_WS_ZZZZZ or other define issue?

lat9 commented 3 years ago

I'm having a hard time replicating this. What action is being performed when the warning is logged?

Note to self: It helps to make edits to the directory that you're testing on.

lat9 commented 3 years ago

Given that the path is repeated, is it a DIR_WS_ZZZZZ or other define issue?

I've replicated it now; it's the fact that the $selected_image_file is prepended with DIR_WS_CATALOG.