lesterchan / wp-downloadmanager

Adds a simple download manager to your WordPress blog.
https://wordpress.org/plugins/wp-downloadmanager/
17 stars 14 forks source link

Current date and time not populated when adding files #24

Closed jishac closed 5 years ago

jishac commented 5 years ago

The current date is not automatically populated when adding a new file. Instead Jan 1, 2000 is selected.

This seems to be an issue with types and the function "file_timestamp" in "wp-downloadmanager.php". gmdate returns strings and is being compared to integers for the selection causing the === to fail.

Suggest altering the code to either cast the assignments of day, month2, etc to int or replacing the === with ==

lesterchan commented 5 years ago

Thanks for the report. Let me know if the above fixes it.

jishac commented 5 years ago

It does correct the issue.