New articles are being created with last_marked and last_published set to the current time, regardless of having been marked or published, due to bad comparison of $marked (0/1) with string 'true'.
Fixed comparison and set 'NULL' string in case not marked/published.
Tested with latest TT-RSS 17.12, PHP 5.6.32, MySQL 5.7.20.
Thanks for the fix, but why use string 'NULL' instead of proper null value?
These parameters are not bound on execute but concatenated with the query string (line 956); the null value would not concatenate. I assume this was because of the 'NOW()'.
I see no reason not to move to the same construct as used for $last_read_qpart (lines 928-934), i.e. use date()/null and bind. It would look a little more elegant/consistent. For the bug fix, thought it better to minimise changes.
right, this makes sense. i'll make a mental note to rework this using date() and a bound parameter later.