Heyuri / Uploader

2ちゃん uploader!
MIT License
2 stars 0 forks source link

Return error if log file can't be found instead of loading 4evar #16

Closed kaguy4 closed 5 months ago

kaguy4 commented 5 months ago

Just repostan from the chat logs:

nao, add something that throws errors if log file defined in config.php isn't found (like there used to be!) something like "log file souko.log isn't found" where souko.log comes from logFile

kaguy4 commented 5 months ago

maybe it should give a similar warning if config file is missing too (instead of giving a white screen)

kaguy4 commented 5 months ago

I did it for config file, but trying doing it for logFile didn't werk as I hoped. Something is wrong with following code (or maybe I put in the wrong place), fix and apply to warota plz:

if (!file_exists($conf['logFile'])) {
    die("Error: Log file <i>$conf['logFile']</i> is missing.");
}
kaguy4 commented 5 months ago

image

I think it was what was raeping my error.log file yesterday too...

hachikuji-san commented 5 months ago

should be fixed.