- makes the Joomla API crash

5 months 2 weeks ago #13711 by kce_ict
Hi Victor,
I hope you are fine. Too bad we could not meet at #jd22dach

I have just installed on a website where I use the Joomla API.
But as soon as the plugin is enabled, the Joomla API throws an error.

Here is the log:

error Uncaught Throwable of type ArgumentCountError thrown with message "Too few arguments to function PlgContentSige::onContentPrepare(), 3 passed in [ROOT]/libraries/src/Plugin/CMSPlugin.php on line 279 and exactly 4 expected". Stack trace: #0 [ROOT]/libraries/src/Plugin/CMSPlugin.php(279): PlgContentSige->onContentPrepare()

Actually, a default value is necessary. Here is the fix at line 251 of /plugins/content/sige.php

public function onContentPrepare($context, &$article, &$params, $limitstart): void

Should be
public function onContentPrepare($context, &$article, &$params, $limitstart = 0): void

Txs for confirming and for patching the next version :)

Marc Dechèvre aka Woluweb
The topic has been locked.
5 months 2 weeks ago - 5 months 2 weeks ago #13715 by Viktor
Replied by Viktor on topic - makes the Joomla API crash
Please log in to see the response. Attention: You need a valid subscription to activate an account.

Kubik-Rubik Joomla! Extensions
The following user(s) said Thank You: kce_ict
The topic has been locked.
Time to create page: 0.115 seconds