News:

Support the VirtueMart project and become a member

Main Menu

Deprecated: file_exists()

Started by scottstreet, June 12, 2026, 02:37:34 AM

Previous topic - Next topic

scottstreet

Joomla 5.4.3 VM 4.4.6 php 8.4.21


Instead of thumbnails, my category pages now display this:


Deprecated: file_exists(): Passing null to parameter #1 ($filename) of type string is deprecated in /home/beqsaleshost/public_html/administrator/components/com_virtuemart/helpers/mediahandler.php on line 690

LIne 690 of mediahandler.php is

   if (file_exists($file_url_thumb) and !is_dir($this->file_url) ) { // Spiros


Not sure how to proceed.

PRO

have you turned off error reporting?

Do you see loss of function?

scottstreet

site still working. biotechequipmentsales.com

Product pages are OK.

But the deprecated file_exists() Passing null error appears in many places.


scottstreet

I found this and  it fixed the appearance problem: Now an icon does appear, not a correct one, but a placeholder at least and not an error message:

he quick fix in most cases is to use the null coalescing operator to provide a default value as appropriate, so you don't need a long null check around every use. For instance, htmlspecialchars($something) can be replaced with htmlspecialchars($something ?? '')

that worked on line 690 of mediahandler.php in the file: administrator/components/com_virtuemart/helpers/mediahandler.php