Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX Crash DateTime::setTimestamp() #19210

Closed
wants to merge 2 commits into from
Closed

FIX Crash DateTime::setTimestamp() #19210

wants to merge 2 commits into from

Conversation

fr69400
Copy link
Contributor

@fr69400 fr69400 commented Oct 26, 2021

FIX Crash PHP Warning: DateTime::setTimestamp() expects parameter 1 to be int, string given in D:\Professionnel\dolibarr\htdocs\core\lib\functions.lib.php on line 2291

Bug description :
See https://www.dolibarr.fr/forum/t/mise-a-jour-vers-v14-0-3/38173
https://www.dolibarr.org/forum/t/datetime-settimestamp-expect-int/21339

FIX Crash PHP Warning:  DateTime::setTimestamp() expects parameter 1 to be int, string given in D:\Professionnel\dolibarr\htdocs\core\lib\functions.lib.php on line 2291
@frederic34
Copy link
Contributor

to submit in branch 14

@frederic34
Copy link
Contributor

#19219
#19230

@fr69400
Copy link
Contributor Author

fr69400 commented Oct 28, 2021

These solutions doesn't work correctly... Example : When you have empty date in database (example : no validation date), you get with :
#19219 : you display in fact the current date... So wrong data
#19230 : you display 01-01-1970 because '' is casted into 0

@eldy eldy closed this in fb6a1d1 Oct 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants