Skip to content
This repository has been archived by the owner on Dec 17, 2021. It is now read-only.

Subtitles only works in PHP 5 >= 5.3.0. #8

Closed
philiparthurmoore opened this issue Jun 15, 2014 · 2 comments
Closed

Subtitles only works in PHP 5 >= 5.3.0. #8

philiparthurmoore opened this issue Jun 15, 2014 · 2 comments
Labels

Comments

@philiparthurmoore
Copy link
Member

Right now, the Singleton pattern in Subtitles relies on PHP 5 >= 5.3.0. Specifically, get_called_class and new static (late static binding) are not compatible with PHP 5.2.4, which WordPress still supports. I need to 1) see if there's a better way to handle this design pattern that accounts for PHP 5.2.4 and 2) see if I even need it at all.

@philiparthurmoore philiparthurmoore added bug and removed bug labels Jun 15, 2014
@philiparthurmoore
Copy link
Member Author

I'm split between bug or enhancement on this. I'll go with bug.

philiparthurmoore pushed a commit that referenced this issue Jun 19, 2014
The first three versions of Subtitles relied on at least PHP 5.3. Unfortunately, late static binding isn't available to PHP 5.2.4, which WordPress supports as a minimum requirement and which is currently used by over 42 percent of all WordPress installs. http://wordpress.org/about/stats/

This change adds the Singleton design pattern into Subtitles_Admin and removes any functions that are specific to PHP 5.3 only. See #8.
@philiparthurmoore
Copy link
Member Author

5.2+ builds came out fine. The failure on 3.7/5.5 is due to deprecated code within core, not Subtitles. Marking this resolved.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant