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)
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
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?
Hello Milbo
Php 7 now handles null items different:
http://php.net/manual/en/migration71.new-features.php (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
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
Can you test with Virtuemart.3.2.3.9579 on PHP7.1+ - http://dev.virtuemart.net/attachments/download/1083/com_virtuemart.3.2.3_extract_first.9579.zip
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.
I confirm that I had the same issue and have solved it by downgrade to php 7.0
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.
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.
Here, please test http://dev.virtuemart.net/attachments/download/1113/com_virtuemart.3.2.13.9772_extract_first.zip