php is annoying
Instead of writing a meaningful post, this evening I have been fiddling with some of the code that runs this site.
Top tips, because apparently I'm rusty and forget:
- Don't indent the closing line of PHP heredoc. No matter how ugly it makes your code look. Because if you leave any whitespace in there the whole thing breaks.
- CSS may cascade, but 'rules for classes' take priority over 'rules for just the element'
Anyway, I'd love to be able to brag about the tiny changes I've made to my comment form, but unfortunately when I put the code live the whole website broke. White screen of nothingness - and, even more annoyingly, nothing at all in error logs! It's all working perfectly on my local copy, so that's a bit mysterious.
Luckily I keep everything in a git repository, so have just undone the last pull and stashed all the changes for later inspection. And then delve into the hideous world of php error reporting settings to figure out why logging isn't happening properly, sigh.
Perhaps your server is running a different PHP version than your local test version? I've had that problem once...
adastra | 9th Sep 15 20:11
Yeah, turned out that was the case... I'd checked and the function which was causing the errors has existed since much older versions, but I guess something changed slightly. Sigh
Katy | 10th Sep 15 9:19