News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Patcher 4.8.10: "Cannot access protected property VmConfig::$execTrigger" on VM

Started by kess, Yesterday at 20:24:53 PM

Previous topic - Next topic

kess

Hello,

after installing the security patcher (com_virtuemart_patcher, version 4.8.10) on a shop running VirtueMart 4.4.8 (Joomla 5.4), the VirtueMart backend stops working with:

Cannot access protected property VmConfig::$execTrigger

The same fatal error also occurs on the frontend: components/com_virtuemart/virtuemart.php:23.

The patched entry files (components/com_virtuemart/virtuemart.php and administrator/components/com_virtuemart/virtuemart.php) start with VmConfig::$execTrigger = true;. In VirtueMart 4.4.8 and 4.4.10, administrator/components/com_virtuemart/helpers/config.php declares the property as static protected $execTrigger = true;.

The patcher manifest says it is meant for releases from 4.0.0 up to below 4.8.10. The second package (HOTFIX_com_virtuemart_patcher_vm3.6_vm6.4_vers4.8.10, patcher 4.8.11) guards the line with property_exists(), but I get the same error on 4.4.x.

Could you please confirm which VirtueMart 4 releases the patch has been tested on?

Thank you.

Ghost

I don't think old versions are actively tested, the changes are theoretical. Anyway the code here is wrong, property_exists() is not the right thing to use because it doesn't consider visibility. Can use isset() instead. Closure or Reflection can be used if the property actually needs to be set regardless of visibility.

kess

Hello,
If a patch is officially stated on the website to be compatible with a specific range of versions, it should be tested against those versions. This cannot be merely a theoretical claim.

Regarding the technical side, I am reporting what I have observed in the file config.php, along with what I believe to be the cause of the issue.

Milbo, the author of that code, should provide an explanation and, if necessary, a fix.

Thank you.