Filemtime() on non existing icon

After adding a feed where website doesn’t have favicon e.g. Hex Rays I’ve got warning about filemtime in rssutils.php. Seems like it trying execute filemtime on nonexisting icon file.

  	if ($favicon_needs_check || $force_refetch) {

  		/* terrible hack: if we crash on floicon shit here, we won't check
  		 * the icon avgcolor again (unless the icon got updated) */

  		$favicon_file = ICONS_DIR . "/$feed.ico";
  		$favicon_modified = @filemtime($favicon_file);

  		Debug::log("checking favicon...", Debug::$LOG_VERBOSE);

  		RSSUtils::check_feed_favicon($site_url, $feed);
  		$favicon_modified_new = @filemtime($favicon_file);

(fragment from rssutils.php.)
Shouldn’t be there a file check (file_exists($favicon_file) ) before these lines?
The warning could be a windows related thing, but nonetheless by the code itself it looks like there is a check needed and in the php manual example there is a file check before the filemtime execution.

I’m thinking it is. The @ symbol is there to suppress errors. If you’re getting errors it means PHP is ignoring that, which is weird. I don’t have a Windows PHP install to verify this.

yep, that’s why @ is there, because it doesn’t matter if this call fails.

if this is windows-specific problem, i’m not interested. consider using a more fitting server platform (for php, that is); hyperv is also an option i guess.

Maybe it is related to debugging feed-> force refetch (what I constantly do for new feeds) which changes the error output and possibly? mess with @ suppression on Windows host.
Anyway thanks for responses.

The debugging tools just change TT-RSS’s internal error reporting level. It doesn’t affect how PHP handles error reporting.

The only way to confirm this is a Windows-specific issue is for someone to install all this on Windows and try it. I’m not going to do that because Windows is not really a great platform for web hosting. As fox said, you can use Hyper-V (if if you have Pro edition) or you can probably even use Windows Subsystem for Linux and install Debian from the Microsoft Store.

Anyway, I’m going to move this to Unsupported (since it is) and if others want to contribute they’re welcome to.