summaryrefslogtreecommitdiff
path: root/includes/libs/ReplacementArray.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2015-12-20 09:00:55 +0100
committerPierre Schmitz <pierre@archlinux.de>2015-12-20 09:00:55 +0100
commita2190ac74dd4d7080b12bab90e552d7aa81209ef (patch)
tree8b31f38de9882d18df54cf8d9e0de74167a094eb /includes/libs/ReplacementArray.php
parent15e69f7b20b6596b9148030acce5b59993b95a45 (diff)
parent257401d8b2cf661adf36c84b0e3fd1cf85e33c22 (diff)
Merge branch 'mw-1.26'
Diffstat (limited to 'includes/libs/ReplacementArray.php')
-rw-r--r--includes/libs/ReplacementArray.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/includes/libs/ReplacementArray.php b/includes/libs/ReplacementArray.php
index 7fdb3093..b6faa378 100644
--- a/includes/libs/ReplacementArray.php
+++ b/includes/libs/ReplacementArray.php
@@ -76,7 +76,7 @@ class ReplacementArray {
* @param array $data
*/
public function mergeArray( $data ) {
- $this->data = array_merge( $this->data, $data );
+ $this->data = $data + $this->data;
$this->fss = false;
}
@@ -84,7 +84,7 @@ class ReplacementArray {
* @param ReplacementArray $other
*/
public function merge( ReplacementArray $other ) {
- $this->data = array_merge( $this->data, $other->data );
+ $this->data = $other->data + $this->data;
$this->fss = false;
}
@@ -111,7 +111,10 @@ class ReplacementArray {
* @return string
*/
public function replace( $subject ) {
- if ( function_exists( 'fss_prep_replace' ) ) {
+ if (
+ function_exists( 'fss_prep_replace' ) &&
+ version_compare( PHP_VERSION, '5.5.0' ) < 0
+ ) {
if ( $this->fss === false ) {
$this->fss = fss_prep_replace( $this->data );
}