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

SOLVED - Too few arguments to function VmController::toggle(), 0 passed in /var

Started by Greg, May 23, 2017, 11:26:14 AM

Previous topic - Next topic

Greg

Hello,
J3.7.1 VM3.2.2

Suddenly I get this error when toggle-ing the Featured Products in the Product List?
Appeared when doing a search in the product list as well.

"Too few arguments to function VmController::toggle(), 0 passed in /var/www/www.lydmuren.dk/www/libraries/legacy/controller/legacy.php on line 709 and at least 1 expected"

Any sugs?


SOLUTION - dont know why but downgrading from PHP 7.1. to 7.0. did the trick. (oh in case you dont know ioncube does not run on php 7.1 yet)

jenkinhill

Quote from: Greg on May 23, 2017, 11:26:14 AM
(oh in case you dont know ioncube does not run on php 7.1 yet)

Good job that VM does not use it, then. But VM, like many other Joomla extensions, is not yet fully ready for PHP7.1.x
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

Milbo

I wonder about php7.1, we get strange bugs, which are for me bugs of php7.1. For example, not derivating attributs of a parent class ? Or here, suddenly to few arguments? What does that mean, the param with default value is not anylonger allowed?
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Jörgen

Hello Milbo

Php 7 now handles null items different:
http://php.net/manual/en/migration71.new-features.php

A null parameter value results in:
QuoteUncaught Error: Too few arguments to function test(), 0 passed in...

This is probably a step on the way for more secure code.

regards

Jörgen @ Kreativ Fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

xdoktor

Hey Milbo,

was there any progress on this?
as testing in xampp using PHP 7.1.6 and so far when trying to press 'featured' quick icon/button on product list page I get:

"Too few arguments to function VmController::toggle(), 0 passed in C:\xampp\htdocs\site1\libraries\legacy\controller\legacy.php on line 709 and at least 1 expected"

I can still enter the product directly and use check box 'featured' as that still works.

any ideas?

peace

X

jenkinhill

Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

xdoktor

Will give it a try but I am close to a live launch and may just have to switch back to lower PHP vers. in meantime.
I will post here if VM dev vers works.

serge-web54

I confirm that I had the same issue and have solved it by downgrade to php 7.0

Studio 42

Anout php7.1, you need to have same number of argument in all parent and children class, it's why you have this error certainly.
Adding default values should solve the problem.

Milbo

Thank you studio, the problem is solved since a month or so. I am going to upload a test version vm3.2.13, then you can check.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Milbo

Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/