VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: TAIWAR on May 26, 2014, 21:52:02 PM

Title: Ask question about product : Warning: array_key_exists() expects
Post by: TAIWAR on May 26, 2014, 21:52:02 PM
Hello I use VM2022a and option: ask question about product. Then When I select the button I have a popup and where I can write message but I have this error :
Warning: array_key_exists() expects parameter 2 to be array, null given in XXXX/askquestion/view.html.php on line 101 :
$mainframe = JFactory::getApplication ();

      $pathway = $mainframe->getPathway ();

      $task = JRequest::getCmd ('task');
1 : how to solve it please ?
2.Then I need to limit the message because by defaut is 50.min and 2000 max change to 10 min ??
3. Also how can I add captcha ?( I already go on configuration, and select capta recapcha...)

Title: Re: Ask question about product : Warning: array_key_exists() expects
Post by: GJC Web Design on May 26, 2014, 22:26:06 PM
simple answer - update - both standard in 2.6.x  config

can't remember if in lower versions

the notice is just a notice... your reporting is too high or add 

error_reporting(E_ERROR);

to the top of askquestion/view.html.php

[attachment cleanup by admin]
Title: Re: Ask question about product : Warning: array_key_exists() expects
Post by: jenkinhill on May 26, 2014, 22:31:34 PM
You are using an old VM version. In the current VM2.6.4 you can select "question minimum length" and also recaptcha is included in this version. The PHP warningr may also be prevented from displaying by turning off Error Reporting in Joomla Global config server settings.  http://forum.virtuemart.net/index.php?topic=118683.0