opodsync icon indicating copy to clipboard operation
opodsync copied to clipboard

Set default DEBUG var sooner

Open orblivion opened this issue 1 year ago • 1 comments

It is required by the exception handler. If you get an exception before (for instance, due to a file access problem with your DATA_ROOT), it will not give you any debug output.

orblivion avatar Oct 03 '24 18:10 orblivion

(and I did actually have a problem with my DATA_ROOT, since I'm working in an unusual environment, which brought me to this suggestion)

orblivion avatar Oct 03 '24 18:10 orblivion

I'll defer the real answer to the owner of this repo, but I would probably do null as well. It distinguishes the concept of "an empty path" from "not a path at all". It could depend on what sorts of type systems you're used to (I'm a fan of Haskell, for instance). Though, I don't know PHP that well, perhaps empty string is more idiomatic for this language. Functionally though, it probably is the same either way.

orblivion avatar Oct 15 '24 13:10 orblivion

Thank you for your PR, sorry Github closed this automatically when I synced this repo from Fossil.

I changed the code to accomodate your issue, but DEBUG should always be defined after requiring config. See https://github.com/kd2org/opodsync/commit/f96af7e2c272cd191e39642a2864ecdbe9149f4a for fix.

bohwaz avatar Oct 15 '24 13:10 bohwaz

Okay I think that works, thanks!

orblivion avatar Oct 16 '24 15:10 orblivion