Closed wrongecho closed 6 months ago
Test these changes at: https://dnsexpirynullfix888.pr-review.itflow.org
(automatic message)
Issues
0 New issues
Measures
0 Security Hotspots
No data about Coverage
26.9% Duplication on New Code
Pardon me for not having too much insight into either PHP or ITFlow, but shouldnt there be an ALTER TABLE statement somewhere? And changes to database initializaiton?
@NickyM I thought the same, but it turns out we actually already allow NULL for the domain expiry field!
https://github.com/itflow-org/itflow/blob/31184f0db19eeaade58086abab478e2b3b959bf3/db.sql#L504
I think the issue was the code previously was trying to add it as a variable which was then enclosed in quotes in the SQL statement, so it was treated as a string rather than an actual null.
Just realised that the error message that I got yesterday, surelay states 'NULL' and not NULL for the error. :)
[Thu Feb 22 08:47:47.736482 2024] [php:error] [pid 2047] [client 172.29.0.1:48080] PHP Fatal error: Uncaught mysqli_sql_exception: Incorrect date value: 'NULL' for column
itflow
.domains
.domain_expire
at row 1 in /var/www/html/post/domain.php:40\nStack trace:\n#0 /var/www/html/post/domain.php(40): mysqli_query()\n#1 /var/www/html/post.php(38): require_once('...')\n#2 {main}\n thrown in /var/www/html/post/domain.php on line 40, referer: [removed]
The domain adding/editing works fine for me then.
@wrongecho @NickyM Things are working fine for me too. I feel confident to reel in.
@NickyM
Just realised that the error message that I got yesterday, surelay states 'NULL' and not NULL for the error. :)
It's truly amazing how tiny, insignificant errors can make or break big features haha! Thanks again for your help on this - has been a thorn in my side since it was first added! :)