0

[2019-03-15 04:50:13] main.CRITICAL: Warning: count(): Parameter must be an array or an object that implements Countable in D:\xampp72\htdocs\mage230\vendor\magento\framework\File\Uploader.php on line 552 {"exception":"[object] (Exception(code: 0): Warning: count(): Parameter must be an array or an object that implements Countable in D:\xampp72\htdocs\mage230\vendor\magento\framework\File\Uploader.php on line 552 at D:\xampp72\htdocs\mage230\vendor\magento\framework\App\ErrorHandler.php:61)"} []

enter image description here

if (is_array($file) && count($file) > 0 && count($file[0]) > 0 && count($file1) > 0) {

Replace with

if (is_array($file) && count($file) > 0 && !empty($file[0]) && (isset($file1) && !empty($file1))) {

enter image description here

  • Did you solved this ? – sumeet bajaj May 22 '19 at 8:32
0

I think you getting the error because the in the count function not passing the array so please try to print $file as below and check either its printing some data or not.

Try :

print_r($file);
| improve this answer | |
  • It is printing data. but getting error in console Uncaught ReferenceError: Base64 is not defined – sumeet bajaj May 22 '19 at 8:33
  • How can override the Uploader.php file for this fix and add above code @Hiren kadivar – Vinit Kumar Sep 25 at 12:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.