savetheinternet / Tinyboard

The better imageboard software
http://tinyboard.org
Other
367 stars 306 forks source link

php 5.2 compatibility breakage #120

Closed czaks closed 11 years ago

czaks commented 11 years ago

This commit broke php 5.2 compatibility: https://github.com/savetheinternet/Tinyboard/commit/a92bb182d91ae98b2a2bc7787d5650050868f1f1

savetheinternet commented 11 years ago

PHP 5.3 was released in 2009 and includes many great features and improvements.

Is it still too soon to drop support for ancient PHP versions? I don't think so.

I say we bump the version requirement to PHP 5.3, at least.

czaks commented 11 years ago

Well, i've recently came across a popular free webhost running php 5.2 and commenting out the content of this single function helped and everything else worked fine. It also, in my opinion, can be rewritten to support php 5.2 well (just factor out the lambda). Bumping version requirement for just one function isn't, imho, the way to go.

MacilPrime commented 11 years ago

I've actually since realized that the bidi_cleanup function as I committed it isn't completely perfect: if both the name and subject start with an RLO character, then the name will be displayed before the subject. In my current branch, I've changed bidi_cleanup to just strip all unicode right-to-left and left-to-right control characters, without using an anonymous function, so that should restore old php compatibility.

savetheinternet commented 11 years ago

Okay, so Tinyboard should now be compatible with PHP 5.2 again. This issue is closed.