0

What is not correct about this statement? It came from the theme developer's files.

ERR (3): Warning: date() expects parameter 2 to be long, object given  in /home/WEBSITE/public_html/app/code/local/Peerforest/MultiProduct/Block/Product/Default/Bestseller.php on line 53

line 53 - $currentDate = date ( 'Y-m-j' , $currentDate );

1 Answer 1

-1

From the PHP doc, parameter 2 is a timestamp.

So you need to check what is the value of $currentDate before line 53 and how it is set.

If this variable is supposed to be the current timestamp then you can get rid of the second parameter in the code:

$currentDate = date('Y-m-j');

As by default, PHP uses the current timestamp for the second parameter.

1
  • Thank you, I have applied this change and will test to see if it removes the error
    – Steven J
    Commented Nov 10, 2016 at 16:37

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.