add upstream patch for PHP 7.2 add patch for bigendian from https://github.com/oscarotero/Gettext/pull/159
22 lines
840 B
Diff
22 lines
840 B
Diff
Adapted for 3.5.9 from
|
|
|
|
From 0134262c82747d9905598d3a0a07ed70049c1040 Mon Sep 17 00:00:00 2001
|
|
From: oscarotero <oom@oscarotero.com>
|
|
Date: Sat, 20 May 2017 13:37:44 +0200
|
|
Subject: [PATCH] removed create_function
|
|
|
|
|
|
diff --git a/src/Translator.php b/src/Translator.php
|
|
index 21fb67b..147f0c2 100644
|
|
--- a/src/Translator.php
|
|
+++ b/src/Translator.php
|
|
@@ -204,7 +204,8 @@ class Translator extends BaseTranslator
|
|
}
|
|
|
|
if (!isset($this->plurals[$domain]['function'])) {
|
|
- $this->plurals[$domain]['function'] = create_function('$n', self::fixTerseIfs($this->plurals[$domain]['code']));
|
|
+ $code = self::fixTerseIfs($this->plurals[$domain]['code']);
|
|
+ $this->plurals[$domain]['function'] = eval("return function (\$n) { $code };");
|
|
}
|
|
|
|
if ($this->plurals[$domain]['count'] <= 2) {
|