Prechádzať zdrojové kódy

merge revision 25142 to release-1.12

git-svn-id: http://framework.zend.com/svn/framework/standard/branches/release-1.12@25143 44c647ce-9c0f-0410-b52a-842ac1e357ba
rob 13 rokov pred
rodič
commit
644fdfb13a
33 zmenil súbory, kde vykonal 58 pridanie a 74 odobranie
  1. 1 1
      INSTALL.txt
  2. 1 1
      README.txt
  3. 1 1
      composer.json
  4. 1 1
      demos/Zend/Gdata/Calendar.php
  5. 1 1
      demos/Zend/Gdata/Docs.php
  6. 1 1
      demos/Zend/Gdata/Gapps.php
  7. 1 1
      demos/Zend/Gdata/Photos.php
  8. 1 1
      demos/Zend/Gdata/YouTubeVideoApp/README.txt
  9. 2 2
      demos/Zend/Gdata/YouTubeVideoApp/index.php
  10. 1 1
      demos/Zend/Gdata/YouTubeVideoApp/operations.php
  11. 2 2
      demos/Zend/Gdata/YouTubeVideoApp/session_details.php
  12. 1 1
      demos/Zend/Gdata/YouTubeVideoBrowser/index.php
  13. 1 1
      demos/Zend/Service/LiveDocx/check-environment.php
  14. 1 1
      documentation/manual/cs/ref/installation.xml
  15. 3 12
      documentation/manual/cs/ref/requirements.xml
  16. 2 2
      documentation/manual/de/ref/requirements.xml
  17. 2 2
      documentation/manual/en/ref/requirements.xml
  18. 3 3
      documentation/manual/es/ref/requirements.xml
  19. 3 3
      documentation/manual/fr/ref/requirements.xml
  20. 2 2
      documentation/manual/he/ref/requirements.xml
  21. 2 2
      documentation/manual/hu/ref/requirements.xml
  22. 1 1
      documentation/manual/id/ref/installation.xml
  23. 3 3
      documentation/manual/id/ref/requirements.xml
  24. 1 1
      documentation/manual/it/ref/installation.xml
  25. 2 2
      documentation/manual/ja/ref/requirements.xml
  26. 3 3
      documentation/manual/pl/ref/requirements.xml
  27. 2 2
      documentation/manual/pt-br/ref/requirements.xml
  28. 1 1
      documentation/manual/tr/ref/installation.xml
  29. 4 4
      documentation/manual/tr/ref/requirements.xml
  30. 1 1
      documentation/manual/zh/ref/installation.xml
  31. 4 4
      documentation/manual/zh/ref/requirements.xml
  32. 2 9
      library/Zend/View/Helper/Navigation/Sitemap.php
  33. 1 1
      puppet/scripts/php-build.sh

+ 1 - 1
INSTALL.txt

@@ -11,7 +11,7 @@ bin/zf.sh (for anything else) to your system executable path.
 SYSTEM REQUIREMENTS
 -------------------
 
-Zend Framework requires PHP 5.2.4 or later. Please see the system requirements
+Zend Framework requires PHP 5.2.11 or later. Please see the system requirements
 appendix for more detailed information:
 
 http://framework.zend.com/manual/en/requirements.html

+ 1 - 1
README.txt

@@ -151,7 +151,7 @@ http://framework.zend.com/manual/en/migration.html
 SYSTEM REQUIREMENTS
 -------------------
 
-Zend Framework requires PHP 5.2.4 or later. Please see our reference
+Zend Framework requires PHP 5.2.11 or later. Please see our reference
 guide for more detailed system requirements:
 
 http://framework.zend.com/manual/en/requirements.html

+ 1 - 1
composer.json

@@ -9,7 +9,7 @@
     "homepage": "http://framework.zend.com/",
     "license": "BSD-3-Clause",
     "require": {
-        "php": ">=5.2.4"
+        "php": ">=5.2.11"
     },
     "autoload": {
         "psr-0": {

+ 1 - 1
demos/Zend/Gdata/Calendar.php

@@ -23,7 +23,7 @@
  * PHP sample code for the Google Calendar data API.  Utilizes the
  * Zend Framework Gdata components to communicate with the Google API.
  *
- * Requires the Zend Framework Gdata components and PHP >= 5.1.4
+ * Requires the Zend Framework Gdata components and PHP >= 5.2.11
  *
  * You can run this sample both from the command line (CLI) and also
  * from a web browser.  When running through a web browser, only

+ 1 - 1
demos/Zend/Gdata/Docs.php

@@ -23,7 +23,7 @@
  * PHP sample code for the Google Documents List data API.  Utilizes the
  * Zend Framework Gdata components to communicate with the Google API.
  *
- * Requires the Zend Framework Gdata components and PHP >= 5.1.4
+ * Requires the Zend Framework Gdata components and PHP >= 5.2.11
  *
  * You can run this sample both from the command line (CLI) and also
  * from a web browser.  When running through a web browser, only

+ 1 - 1
demos/Zend/Gdata/Gapps.php

@@ -23,7 +23,7 @@
  * PHP sample code for the Google Calendar data API.  Utilizes the
  * Zend Framework Gdata components to communicate with the Google API.
  *
- * Requires the Zend Framework Gdata components and PHP >= 5.1.4
+ * Requires the Zend Framework Gdata components and PHP >= 5.2.11
  *
  * You can run this sample both from the command line (CLI) and also
  * from a web browser.  Run this script without any command line options to

+ 1 - 1
demos/Zend/Gdata/Photos.php

@@ -23,7 +23,7 @@
  * PHP sample code for the Photos data API.  Utilizes the
  * Zend Framework Gdata components to communicate with the Google API.
  *
- * Requires the Zend Framework Gdata components and PHP >= 5.1.4
+ * Requires the Zend Framework Gdata components and PHP >= 5.2.11
  *
  * You can run this sample from a web browser.
  *

+ 1 - 1
demos/Zend/Gdata/YouTubeVideoApp/README.txt

@@ -3,7 +3,7 @@
 PHP sample code for the YouTube data API.  Utilizes the Zend Framework
 Zend_Gdata component to communicate with the YouTube data API.
 
-Requires the Zend Framework Zend_Gdata component and PHP >= 5.1.4
+Requires the Zend Framework Zend_Gdata component and PHP >= 5.2.11
 This sample is run from within a web browser.  These files are required:
 
 session_details.php - a script to view log output and session variables

+ 2 - 2
demos/Zend/Gdata/YouTubeVideoApp/index.php

@@ -22,7 +22,7 @@
  * PHP sample code for the YouTube data API.  Utilizes the Zend Framework
  * Zend_Gdata component to communicate with the YouTube data API.
  *
- * Requires the Zend Framework Zend_Gdata component and PHP >= 5.1.4
+ * Requires the Zend Framework Zend_Gdata component and PHP >= 5.2.11
  * This sample is run from within a web browser.  These files are required:
  * session_details.php - a script to view log output and session variables
  * operations.php - the main logic, which interfaces with the YouTube API
@@ -190,4 +190,4 @@ END;
   </div>
 </div>
 </body>
-</html>
+</html>

+ 1 - 1
demos/Zend/Gdata/YouTubeVideoApp/operations.php

@@ -22,7 +22,7 @@
  * PHP sample code for the YouTube data API.  Utilizes the Zend Framework
  * Zend_Gdata component to communicate with the YouTube data API.
  *
- * Requires the Zend Framework Zend_Gdata component and PHP >= 5.1.4
+ * Requires the Zend Framework Zend_Gdata component and PHP >= 5.2.11
  * This sample is run from within a web browser.  These files are required:
  * session_details.php - a script to view log output and session variables
  * operations.php - the main logic, which interfaces with the YouTube API

+ 2 - 2
demos/Zend/Gdata/YouTubeVideoApp/session_details.php

@@ -22,7 +22,7 @@
  * PHP sample code for the YouTube data API.  Utilizes the Zend Framework
  * Zend_Gdata component to communicate with the YouTube data API.
  *
- * Requires the Zend Framework Zend_Gdata component and PHP >= 5.1.4
+ * Requires the Zend Framework Zend_Gdata component and PHP >= 5.2.11
  * This sample is run from within a web browser.  These files are required:
  * session_details.php - a script to view log output and session variables
  * operations.php - the main logic, which interfaces with the YouTube API
@@ -63,4 +63,4 @@ foreach($session_copy as $key => $value) {
 ?>
 <br clear="both" />
 <a href="index.php">back</a>
-    </div></body></html>
+    </div></body></html>

+ 1 - 1
demos/Zend/Gdata/YouTubeVideoBrowser/index.php

@@ -23,7 +23,7 @@
  * PHP sample code for the YouTube data API.  Utilizes the Zend Framework
  * Zend_Gdata component to communicate with the YouTube data API.
  *
- * Requires the Zend Framework Zend_Gdata component and PHP >= 5.1.4
+ * Requires the Zend Framework Zend_Gdata component and PHP >= 5.2.11
  *
  * This sample is run from within a web browser.  These files are required:
  * index.php - the main logic, which interfaces with the YouTube API

+ 1 - 1
demos/Zend/Service/LiveDocx/check-environment.php

@@ -5,7 +5,7 @@ include_once './common.php';
 define('TEST_PASS',       'PASS');
 define('TEST_FAIL',       'FAIL');
 
-define('MIN_PHP_VERSION', '5.2.4');
+define('MIN_PHP_VERSION', '5.2.11');
 define('MIN_ZF_VERSION',  '1.10.0beta');
 
 define('SOCKET_TIMEOUT',   5); // seconds

+ 1 - 1
documentation/manual/cs/ref/installation.xml

@@ -4,7 +4,7 @@
 
     <para>
         Zend Framework je vytvořen s využitím objektově orientovaného PHP 5
-        a vyžaduje PHP 5.1.4 nebo vyšší. Podívejte se na
+        a vyžaduje PHP 5.2.11 nebo vyšší. Podívejte se na
         <link linkend="requirements">systémové požadavky</link> pro detailní informace.
     </para>
 

+ 3 - 12
documentation/manual/cs/ref/requirements.xml

@@ -11,23 +11,14 @@
         <title>Požadovaná verze PHP</title>
 
         <para>
-            Zend Framework vyžaduje PHP 5.1.4 nebo vyšší. Některá SPL rozhraní
-            jako například <code>Countable</code> nebyla v předchozích
-            verzích PHP stabilní.
+            Zend Framework vyžaduje PHP 5.2.11 nebo vyšší.
         </para>
 
         <para>
             Zend Framework má obsáhlou kolekci automatických testů, které můžete
-            spustit s použitím PHPUnit 3.0 nebo vyšší. Tato verze PHPUnit také
-            vyžaduje PHP 5.1.4 nebo vyšší.
+            spustit s použitím PHPUnit 3.4.15. Tato verze PHPUnit také
+            vyžaduje PHP 5.2.11 nebo vyšší.
         </para>
-
-        <para>
-            Přestože Zend Framework bude fungovat správně s verzí PHP zmíněnou výše,
-            doporučujeme použití PHP 5.2.3 nebo vyšší. Novější verze PHP obsahuje
-            důležitá bezpečnostní a výkonová vylepšení.
-        </para>
-
     </sect1>
 
     <sect1 id="requirements.extensions">

+ 2 - 2
documentation/manual/de/ref/requirements.xml

@@ -31,12 +31,12 @@
             <para>
                 Zend empfiehlt das aktuellste Release von <acronym>PHP</acronym> wegen kritischer
                 Sicherheits und Performance Verbesserungen, und unterstützt aktuell
-                <acronym>PHP</acronym> 5.2.4 oder höher.
+                <acronym>PHP</acronym> 5.2.11 oder höher.
             </para>
 
             <para>
                 Zend Framework hat eine sehr umfangreiche Sammlung von automatisierten Tests, welche
-                mit PHPUnit 3.3.0 oder einer späteren Version, ausgeführt werden können.
+                mit PHPUnit 3.4.15 oder einer späteren Version, ausgeführt werden können.
             </para>
         </sect2>
 

+ 2 - 2
documentation/manual/en/ref/requirements.xml

@@ -27,12 +27,12 @@
             <para>
                 Zend recommends the most current release of <acronym>PHP</acronym> for critical
                 security and performance enhancements, and currently supports
-                <acronym>PHP</acronym> 5.2.4 or later.
+                <acronym>PHP</acronym> 5.2.11 or later.
             </para>
 
             <para>
                 Zend Framework has an extensive collection of unit tests, which you can run using
-                PHPUnit 3.3.0 or later.
+                PHPUnit 3.4.15 or later.
             </para>
         </sect2>
 

+ 3 - 3
documentation/manual/es/ref/requirements.xml

@@ -24,12 +24,12 @@
 
         <title>Versión de PHP</title>
 
-        <para> Zend recomienda <acronym>PHP</acronym> 5.2.3 o superior por
+        <para> Zend recomienda <acronym>PHP</acronym> 5.2.11 o superior por
             mejoras en la seguridad críticas y en el rendimiento, aunque Zend
-            Framework requiere sólo <acronym>PHP</acronym> 5.1.4 o posterior. </para>
+            Framework requiere sólo <acronym>PHP</acronym> 5.2.11 o posterior. </para>
 
         <para> Zend Framework tiene una extensa colección de unidades de prueba,
-            que puede ejecutar utilizando PHPUnit 3.0 o posterior. </para>
+            que puede ejecutar utilizando PHPUnit 3.4.15. </para>
 
     </sect1>
 

+ 3 - 3
documentation/manual/fr/ref/requirements.xml

@@ -28,13 +28,13 @@
 
             <para>
                 Zend recommande la version la plus récente de PHP pour des questions de
-                sécurité et de performances, et supporte actuellement la version 5.2.4 de PHP (ou
+                sécurité et de performances, et supporte actuellement la version 5.2.11 de PHP (ou
                 plus récent).
             </para>
 
             <para>
                 Zend Framework possède une collection étendue de tests automatisés, que vous
-                pouvez lancer avec PHPUnit 3.3.0 ou plus.
+                pouvez lancer avec PHPUnit 3.4.15 ou plus.
             </para>
         </sect2>
 
@@ -114,4 +114,4 @@
             <xi:include href="../../en/ref/requirements-dependencies-table.xml" />
         </sect2>
     </sect1>
-</appendix>
+</appendix>

+ 2 - 2
documentation/manual/he/ref/requirements.xml

@@ -20,11 +20,11 @@
             <title>גרסאת PHP</title>
 
             <para>
-                Zend ממליצים על שימוש בגרסא האחרונה של PHP אשר מכילה את כל תיקוני הבאגים ופרצות האבטחה שנמצאו, וכרגע תומכת ב PHP 5.2.4 ומעלה.
+                Zend ממליצים על שימוש בגרסא האחרונה של PHP אשר מכילה את כל תיקוני הבאגים ופרצות האבטחה שנמצאו, וכרגע תומכת ב PHP 5.2.11 ומעלה.
             </para>
 
             <para>
-                Zend Framework מכילה מגוון רחב של בדיקות, שתוכלו להריץ על ידי שימוש ב PHPUnit 3.3.0 ומעלה.
+                Zend Framework מכילה מגוון רחב של בדיקות, שתוכלו להריץ על ידי שימוש ב PHPUnit 3.4.15 ומעלה.
             </para>
 
         </sect2>

+ 2 - 2
documentation/manual/hu/ref/requirements.xml

@@ -36,12 +36,12 @@
             <para>
                 Ajánlott a <acronym>PHP</acronym> legújabb kiadása a válságos
                 biztonsági és teljesítménybeli javítások okán. Jelenleg a
-                <acronym>PHP</acronym> 5.2.4 és későbbi kiadások támogatottak.
+                <acronym>PHP</acronym> 5.2.11 és későbbi kiadások támogatottak.
             </para>
 
             <para>
                 A Zend Keretrendszer átfogó egységtesztekkel rendelkezik, melyek
-                PHPUnit 3.3.0-val vagy későbbivel futtathatók.
+                PHPUnit 3.4.15-val vagy későbbivel futtathatók.
             </para>
 
         </sect2>

+ 1 - 1
documentation/manual/id/ref/installation.xml

@@ -3,7 +3,7 @@
     <title>Instalasi</title>
 
     <para>
-        Zend Framework membutuhkan PHP 5.1.4 atau yang lebih baru, walaupun Zend sangat merekomendasikan 5.2.3 atau yang
+        Zend Framework membutuhkan PHP 5.2.11 atau yang lebih baru, walaupun Zend sangat merekomendasikan 5.2.11 atau yang
         lebih baru dengan pertimbangan keamanan dan performansi yang ada pada versi terakhir. Anda dapat
         melihat lebih detail di <link linkend="requirements">lampiran kebutuhan</link>.
     </para>

+ 3 - 3
documentation/manual/id/ref/requirements.xml

@@ -20,13 +20,13 @@
         <title>Versi PHP</title>
 
         <para>
-            Zend merekomendasikan PHP 5.2.4 atau yang lebih baru dengan pertimbangan keamanan dan performansi,
-            walaupun sebenarnya ZF membutuhkan PHP minimal versi 5.1.4 untuk dapat digunakan.
+            Zend merekomendasikan PHP 5.2.11 atau yang lebih baru dengan pertimbangan keamanan dan performansi,
+            walaupun sebenarnya ZF membutuhkan PHP minimal versi 5.2.11 untuk dapat digunakan.
         </para>
 
         <para>
             Zend Framework memiliki koleksi unit test yang lengkap, yang dapat anda jalankan menggunakan
-            PHPUnit 3.0 atau yang lebih baru.
+            PHPUnit 3.4.15 atau yang lebih baru.
         </para>
 
     </sect1>

+ 1 - 1
documentation/manual/it/ref/installation.xml

@@ -3,7 +3,7 @@
     <title>Installazione</title>
 
     <para>
-        Il Framework Zend è sviluppato con una programmazione in PHP 5 orientata agli oggetti e necessita di PHP 5.1.4 o successivo.
+        Il Framework Zend è sviluppato con una programmazione in PHP 5 orientata agli oggetti e necessita di PHP 5.2.11 o successivo.
         Fare riferimento all'appendice <link linkend="requirements">requisiti di sistema</link> per informazioni più dettagliate.
     </para>
 

+ 2 - 2
documentation/manual/ja/ref/requirements.xml

@@ -31,12 +31,12 @@
             <para>
                 Zend では最新版の <acronym>PHP</acronym> を使うことを推奨します。
                 重要なセキュリティ修正が行われ、パフォーマンスも改善されているためです。
-                現在、Zend Framework は <acronym>PHP</acronym> 5.2.4 以降のバージョンをサポートしています。
+                現在、Zend Framework は <acronym>PHP</acronym> 5.2.11 以降のバージョンをサポートしています。
             </para>
 
             <para>
                 Zend Framework には広範囲におよぶユニットテストも存在します。
-                これらを実行するには PHPUnit 3.3.0 以降が必要です。
+                これらを実行するには PHPUnit 3.4.15 以降が必要です。
             </para>
 
         </sect2>

+ 3 - 3
documentation/manual/pl/ref/requirements.xml

@@ -27,14 +27,14 @@
         <title>Wersja PHP</title>
 
         <para>
-            Zend zaleca wersję PHP 5.2.3 lub wyższą z powodu znacznego zwiększenia
+            Zend zaleca wersję PHP 5.2.11 lub wyższą z powodu znacznego zwiększenia
             bezpieczeństwa i wydajności, jednak Zend Framework do działania
-            wymaga wersji PHP 5.1.4 lub wyższej.
+            wymaga wersji PHP 5.2.11 lub wyższej.
         </para>
 
         <para>
             Zend Framework posiada obszerny zestaw testów jednostkowych, które
-            możesz uruchomić za pomocą biblioteki PHPUnit 3.0 lub wyższej.
+            możesz uruchomić za pomocą biblioteki PHPUnit 3.4.15.
         </para>
 
     </sect1>

+ 2 - 2
documentation/manual/pt-br/ref/requirements.xml

@@ -30,12 +30,12 @@
             <para>
                 Zend recomenda a versão mais atual do <acronym>PHP</acronym> em razão das
                 melhorias na segurança e no desempenho, e atualmente oferece suporte ao
-                <acronym>PHP</acronym> 5.2.4 ou posterior.
+                <acronym>PHP</acronym> 5.2.11 ou posterior.
             </para>
 
             <para>
                 Zend Framework tem uma extensa coleção de testes unitários, que você pode
-                executar usando PHPUnit 3.3.0 ou posterior.
+                executar usando PHPUnit 3.4.15 ou posterior.
             </para>
         </sect2>
 

+ 1 - 1
documentation/manual/tr/ref/installation.xml

@@ -2,7 +2,7 @@
     <title>Kurulum</title>
 
     <para>
-        Zend Framework nesneye dayalı PHP 5 ile oluşturuldu ve PHP 5.1.4 veya yenisine ihtiyaç duyar.
+        Zend Framework nesneye dayalı PHP 5 ile oluşturuldu ve PHP 5.2.11 veya yenisine ihtiyaç duyar.
         Lütfen daha ayrıntılı bilgi için <link linkend="requirements">sistem gereksinimleri eki</link>ne bakın.
     </para>
 

+ 4 - 4
documentation/manual/tr/ref/requirements.xml

@@ -11,18 +11,18 @@
         <title>Gerekli PHP versiyonu</title>
 
         <para>
-        Zend Framework PHP 5.1.4 veya yenisini gerektiriyor. Bazı SPL arayüzleri <code>Countable</code>
+        Zend Framework PHP 5.2.11 veya yenisini gerektiriyor. Bazı SPL arayüzleri <code>Countable</code>
         gibi , PHP'nin önceki sürümlerinde kararlı değildi.
         </para>
 
         <para>
-        Zend Framework PHPUnit 3.0 veya yenisiyle çalıştırabileceğiniz geniş kapsamlı
-        otomatikleşmiş testler içermektedir.PHPUnit'in bu versiyonu da ayrıca PHP 5.1.4
+        Zend Framework PHPUnit 3.4.15 veya yenisiyle çalıştırabileceğiniz geniş kapsamlı
+        otomatikleşmiş testler içermektedir.PHPUnit'in bu versiyonu da ayrıca PHP 5.2.11
         veya yenisini gerektirmektedir.
         </para>
         <para>
             Yukarıda bahsedilen PHP versiyonunda Zend Framework doğru olarak çalışaktır ama
-        buna rağmen PHP 5.2.3 veya yenisini kullanmanızı şiddetle tavsiye ediyoruz.
+        buna rağmen PHP 5.2.11 veya yenisini kullanmanızı şiddetle tavsiye ediyoruz.
         PHP'nin yeni versiyonunda  önemli güvenlik ve performans geliştirmeleri  var.
         </para>
 

+ 1 - 1
documentation/manual/zh/ref/installation.xml

@@ -3,7 +3,7 @@
     <title>安装</title>
 
     <para>
-        Zend Framework 要求 PHP版本不低于5.1.4,但强烈建议使用 5.2.3 或更高版本,因为在这两个版本之间有
+        Zend Framework 要求 PHP版本不低于5.2.11,但强烈建议使用 5.2.11 或更高版本,因为在这两个版本之间有
         许多重大安全和性能方面的改善和提高。请查阅 <link linkend="requirements">附录 需求</link> 了解更多信息。
     </para>
 

+ 4 - 4
documentation/manual/zh/ref/requirements.xml

@@ -11,17 +11,17 @@
         <title>PHP 版本需求</title>
 
         <para>
-            Zend Framework 需要 PHP 5.1.4 或更高版本。例如 <code>Countable</code>
+            Zend Framework 需要 PHP 5.2.11 或更高版本。例如 <code>Countable</code>
             这样一些 SPL 接口在 PHP 之前的版本中没有被正式使用。
         </para>
 
         <para>
-            Zend Framework 提供了大量自动化测试,可以使用 PHPUnit 3.0 或更高版本运行。
-            这个版本的 PHPUnit 同样也需要 PHP 5.1.4 或更高版本。
+            Zend Framework 提供了大量自动化测试,可以使用 PHPUnit 3.4.15 或更高版本运行。
+            这个版本的 PHPUnit 同样也需要 PHP 5.2.11 或更高版本。
         </para>
 
         <para>
-            虽然 Zend Framework 可以在上面提到的 PHP 版本下正确工作,但是强烈建议使用 PHP 5.2.2 或更高版本。
+            虽然 Zend Framework 可以在上面提到的 PHP 版本下正确工作,但是强烈建议使用 PHP 5.2.11 或更高版本。
             新版本的 PHP 有许多重要的安全更新和性能提升。
         </para>
 

+ 2 - 9
library/Zend/View/Helper/Navigation/Sitemap.php

@@ -269,15 +269,8 @@ class Zend_View_Helper_Navigation_Sitemap
             $enc = $this->view->getEncoding();
         }
 
-        // TODO: remove check when minimum PHP version is >= 5.2.3
-        if (version_compare(PHP_VERSION, '5.2.3', '>=')) {
-            // do not encode existing HTML entities
-            return htmlspecialchars($string, ENT_QUOTES, $enc, false);
-        } else {
-            $string = preg_replace('/&(?!(?:#\d++|[a-z]++);)/ui', '&amp;', $string);
-            $string = str_replace(array('<', '>', '\'', '"'), array('&lt;', '&gt;', '&#39;', '&quot;'), $string);
-            return $string;
-        }
+        // do not encode existing HTML entities
+        return htmlspecialchars($string, ENT_QUOTES, $enc, false);
     }
 
     // Public methods:

+ 1 - 1
puppet/scripts/php-build.sh

@@ -9,7 +9,7 @@ EXTRA_FLAGS=
 if [ -z "$VERSION" ]; then
     echo "Usage: php-build.sh {VERSION}"
     echo ""
-    echo "e.g. php-build.sh 5.2.4"
+    echo "e.g. php-build.sh 5.2.11"
     exit;
 fi