Required parameter $htmlIn follows optional parameter $selected

Started by Kuubs, November 09, 2022, 14:28:41 PM

Previous topic - Next topic

Kuubs

Hello,

After updating to PHP8 I get the following message:

Required parameter $htmlIn follows optional parameter $selected

This is because of the following line of code:

public function displayListFE (VirtueMartCart $cart, $selected = 0, &$htmlIn) {

This seems like a core function that gets overridden. Does the core needs to be adjusted to fix this?


This is on the newest version virtuemart: 4.0.7 and Joomla 3.10.11 in combination with the aforementioned PHP8.

StefanSTS

Update VirtueMart or maybe third party payment plugins.

Please get used to specifying proper version numbers.

Stefan
--
Stefan Schumacher
www.jooglies.com - VirtueMart Invoice Layouts

Please use only stable versions with even numbers for your live shop! Use Alpha versions only if you know what risk you are taking.

Kuubs

Quote from: StefanSTS on November 10, 2022, 16:16:42 PM
Update VirtueMart or maybe third party payment plugins.

Please get used to specifying proper version numbers.

Stefan

Yeah I'm sorry I should've specified version numbers. I'm already on the newest VM version:

This is on the newest version virtuemart: 4.0.7 and Joomla 3.10.11 in combination with the aforementioned PHP8.

I updated the OP.

Milbo

This is a plugin. Just change the line to

public function plgVmDisplayListFEShipment (VirtueMartCart $cart, $selected, &$htmlIn) {
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Kuubs

Quote from: Milbo on November 10, 2022, 19:53:42 PM
This is a plugin. Just change the line to

public function plgVmDisplayListFEShipment (VirtueMartCart $cart, $selected, &$htmlIn) {


Ok thank you!

Kuubs

Quote from: Milbo on November 10, 2022, 19:53:42 PM
This is a plugin. Just change the line to

public function plgVmDisplayListFEShipment (VirtueMartCart $cart, $selected, &$htmlIn) {


Unfortunately this doesn't work because it overrides a core function:

public function plgVmDisplayListFEPayment( VirtueMartCart $cart, $selected = 0, &$htmlIn ) {
return $this->displayListFE( $cart, $selected, $htmlIn );
}


So this is probably something that needs to be updated in the core code. I'm not comfortable in changing the core code.

pinochico

It sounds like mix

shipment and payment :D

send all debug info
www.minijoomla.org  - new portal for Joomla!, Virtuemart and other extensions
XML Easy Feeder - feeds for FB, GMC,.. from products, categories, orders, users, articles, acymailing subscribers and database table
Virtuemart Email Manager - customs email templates
Import products for Virtuemart - from CSV and XML
Rich Snippets - Google Structured Data
VirtueMart Products Extended - Slider with products, show Others bought, Products by CF ID and others filtering products

StefanSTS

Quote from: Kuubs on November 10, 2022, 17:16:56 PM
I'm already on the newest VM version:
This is on the newest version virtuemart: 4.0.7 and Joomla 3.10.11 in combination with the aforementioned PHP8.

Try to avoid the term "newest version" it's not a version number and different people see different things using this term.

There is a revision number attached to each version. 4.0.7.10734 is a proper version number.

If you use those in future you will get better and faster answers.

Regards
Stefan
--
Stefan Schumacher
www.jooglies.com - VirtueMart Invoice Layouts

Please use only stable versions with even numbers for your live shop! Use Alpha versions only if you know what risk you are taking.

Kuubs

Quote from: StefanSTS on November 14, 2022, 13:35:37 PM
Quote from: Kuubs on November 10, 2022, 17:16:56 PM
I'm already on the newest VM version:
This is on the newest version virtuemart: 4.0.7 and Joomla 3.10.11 in combination with the aforementioned PHP8.

Try to avoid the term "newest version" it's not a version number and different people see different things using this term.

There is a revision number attached to each version. 4.0.7.10734 is a proper version number.

If you use those in future you will get better and faster answers.

Regards
Stefan

Yeah im running on that version will do that i the future