Permalink
Browse files

Remove a workaround for PHP 5.3.0 in JLanguage.

This raises the minimum requirement to 5.3.1.
  • Loading branch information...
1 parent 4686e89 commit 23b01700c290f19acbf2aa581056d7c62e04e82d @realityking realityking committed Mar 19, 2012
Showing with 4 additions and 21 deletions.
  1. +1 −1 README.markdown
  2. +3 −20 libraries/joomla/language/language.php
View
@@ -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
@@ -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);

0 comments on commit 23b0170

Please sign in to comment.