Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Remove a workaround for PHP 5.3.0 in JLanguage.

This raises the minimum requirement to 5.3.1.
  • Loading branch information...
commit 23b01700c290f19acbf2aa581056d7c62e04e82d 1 parent 4686e89
@realityking realityking authored
Showing with 4 additions and 21 deletions.
  1. +1 −1  README.markdown
  2. +3 −20 libraries/joomla/language/language.php
View
2  README.markdown
@@ -16,7 +16,7 @@ Requirements
------------
* PHP 5.2.4+ for Platform versions 11.x
-* PHP 5.3+ for Platform versions 12.x
+* PHP 5.3.1+ for Platform versions 12.x
Installation
View
23 libraries/joomla/language/language.php
@@ -800,31 +800,14 @@ protected function loadLanguage($filename, $extension = 'unknown')
*/
protected function parse($filename)
{
- $version = phpversion();
-
// Capture hidden PHP errors from the parsing.
$php_errormsg = null;
$track_errors = ini_get('track_errors');
ini_set('track_errors', true);
- if ($version >= '5.3.1')
- {
- $contents = file_get_contents($filename);
- $contents = str_replace('_QQ_', '"\""', $contents);
- $strings = @parse_ini_string($contents);
- }
- else
- {
- $strings = @parse_ini_file($filename);
-
- if ($version == '5.3.0' && is_array($strings))
- {
- foreach ($strings as $key => $string)
- {
- $strings[$key] = str_replace('_QQ_', '"', $string);
- }
- }
- }
+ $contents = file_get_contents($filename);
+ $contents = str_replace('_QQ_', '"\""', $contents);
+ $strings = @parse_ini_string($contents);
// Restore error tracking to what it was before.
ini_set('track_errors', $track_errors);
Please sign in to comment.
Something went wrong with that request. Please try again.