Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
crisz82385yWhat about some unicode blank character in comments? In that case, the syntax checker wouldn't throw any warning since it's in a comment, but the PHP parser would explode
-
C0D4682115y@crisz I wouldnt think so, there was nothing copied into it, plus vsCode has a non UTF8 character highlighter for when I have to deal with some of those shitty characters with csv's and what not.
Good way to do a spot check before letting it through.
I'd completely accept this project just being a pain in the ass. -
in many php sites i worked on, something similar happened.
i always imagined it's because when i modify a file and force the server to re-parse and re-cache it, it realizes it's running php and goes "FUCK NO, THAT'S A MISTAKE, 500, I REFUSE".
but then after back and forth modifications for a few times, it goes "well... if you insist, i guess i have no other choice..." -
C0D4682115y@crisz there's a extension "highlight bad chars"
It's not entirely non-UTF8 but it finds the common crap that is easy to miss.
Related Rants
So today was interesting.
I had to extract the domain from an email address and compare the domain to a hard coded whitelist, nothing difficult, fuck takes 2 min really.
Except the project starts throwing 500 errors for no god damn reason, like seriously, I double check syntax, nope looks fine, run pho's syntax checker on the file
# php -l /path/to/file.php
Nope says it's all good.
Checks error log on server -> no log
OoooooooooKay then.
Comments out the few lines, saves, errors gone.
remove comments, error comes back.
Do this a few times, and magically the fucking thing stops throwing errors, now I haven't actually changed anything, and I know this project is so fragile I don't know how it stays running at times but fuck me this is a painful joke.
rant
php
500 errors
nothing wrong
it's a love / hate relationship
wile 500 appears
fuck my life