Editor Line 958: Warning In Count()
Editor Line 958: Warning In Count()
HassanDomeDenea
Posts: 29Questions: 10Answers: 0
in Editor
Greetings
I've encountered a problem in this Line in Editor.php File (1.9.2):
if ( count($data, COUNT_RECURSIVE) >= ini_get('max_input_vars') ) {
$this->_out['error'] = 'Too many rows edited at the same time (tech info: max_input_vars exceeded).';
}
It gave me this error on some occasions:
<b>Warning</b>: count(): Parameter must be an array or an object that implements Countable in <b>D:\laragon\www\hddclinic\api\app\vendor\datatables.net\editor-php\Editor.php</b> on line <b>959</b><br />
I tried to var_dump the $data variable, and it was NULL.
I Do not know what this line do exactly, but I decided to add this:
if ( $data && count($data, COUNT_RECURSIVE) >= ini_get('max_input_vars') ) {
$this->_out['error'] = 'Too many rows edited at the same time (tech info: max_input_vars exceeded).';
}
I don't know if that would have any side-effects.
This discussion has been closed.
Replies
Thank you! I completely agree and have committed a patch. It will be in the next release.
Regards,
Allan