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

1
  • Did you solved this ? Commented May 22, 2019 at 8:32

1 Answer 1

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);
2
  • It is printing data. but getting error in console Uncaught ReferenceError: Base64 is not defined Commented May 22, 2019 at 8:33
  • How can override the Uploader.php file for this fix and add above code @Hiren kadivar Commented Sep 25, 2020 at 12:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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