VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: scottstreet on June 12, 2026, 02:37:34 AM

Title: Deprecated: file_exists()
Post by: scottstreet on June 12, 2026, 02:37:34 AM
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.
Title: Re: Deprecated: file_exists()
Post by: PRO on June 12, 2026, 14:52:17 PM
have you turned off error reporting?

Do you see loss of function?
Title: Re: Deprecated: file_exists()
Post by: scottstreet on June 12, 2026, 20:03:13 PM
site still working. biotechequipmentsales.com

Product pages are OK.

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

Title: Re: Deprecated: file_exists()
Post by: scottstreet on June 17, 2026, 00:39:22 AM
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