nashikouen / kotatsuBBS

image board software written in php
BSD 3-Clause "New" or "Revised" License
5 stars 1 forks source link

failed to load post on fresh install #5

Closed chen-chan1 closed 2 months ago

chen-chan1 commented 3 months ago

Fatal error: Uncaught Error: Call to a member function getPostID() on null in /var/www/html/classes/html.php:300

ik a check if empty can fix this but it seems something is deeper.

chen-chan1 commented 3 months ago

what i believe is causing this is thread has no post in the data base,

chen-chan1 commented 2 months ago

i meant to say is op post had thread id of -1 witch was not getting updated... idk why, i am sure if i debugged it more i could find out but the object before and afer the db has the right thread id.

so i really dont know why it did not work. so i manualy set it since it was post one. it wont cause any issues just i dont like it like that..

chen-chan1 commented 2 months ago

since i manually set the threadedID this is no longer a issue. though i want to make it so that if some how it strangely comes up again, it will log and will not fail

chen-chan1 commented 2 months ago

logging added, prevent empty post