You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$row[$key] = new \DateInterval("PT$m[2]H$m[3]M$m[4]S");
create new \DateInterval by force can be unwanted.
In case the key is primary - script ends with an exception, because \DateInterval doesn't have an __toString() method.
From my perspective would be better to store as string and add a new helper function for creating \DateInterval from string in Nette/utils.
Or much complicated way can be create new Class Nette\Utils\DateInterval exteded of \DateInterval which contain __toString() method - but there is a lots of options formating
Thanks for advice
The text was updated successfully, but these errors were encountered:
database/src/Database/Helpers.php
Line 223 in 66fbed8
create new
\DateInterval
by force can be unwanted.In case the key is primary - script ends with an exception, because
\DateInterval
doesn't have an__toString()
method.From my perspective would be better to store as string and add a new helper function for creating
\DateInterval
from string inNette/utils
.Or much complicated way can be create new Class
Nette\Utils\DateInterval
exteded of\DateInterval
which contain__toString()
method - but there is a lots of options formatingThanks for advice
The text was updated successfully, but these errors were encountered: