Skip to content

Commit

Permalink
Merge branch '2.6.x' into 2.x
Browse files Browse the repository at this point in the history
* 2.6.x:
  Cleaning up merge messes
  Update Smarty to 3.1.31
  Update Snoopy class in magpieRSS to replace deprecated each() calls
  Replace all deprecated while/each() loops with foreach() loops for PHP 7.2 compat
  Missed one instance of each() in xPDO class + some in unit tests
  Replace all deprecated while/each() loops with foreach() loops
  Update version for 2.7.0-dev
  Fix unit tests for use with PHPUnit 4.3.x
  Update version for 2.6.0-pl release
  • Loading branch information
opengeek committed Mar 28, 2018
2 parents e88b725 + 72f1fce commit 0acaf39
Show file tree
Hide file tree
Showing 257 changed files with 13,161 additions and 8,938 deletions.
1 change: 1 addition & 0 deletions core/docs/changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ development release, and is only shown to give an idea of what's currently in th

MODX Revolution 2.6.2-pl (to be released)
====================================
- Replace usages of each() to avoid deprecated warnings in PHP 7.2 [#13829]
- Prevent adding ./ to filepath when in root of a mediasource [#13778]
- Fix error with getonline processor on systems with only_full_group_by sql_mode [#13835]
- Prevent logging errors for comments or empty tags [#13771]
Expand Down
2 changes: 1 addition & 1 deletion core/lexicon/country/ar.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@
$_country_lang["ss"] = 'جنوب السودان'; // South Sudan
$_country_lang["st"] = 'ساو تومي وبرينسيبي'; // Sao Tome and Principe
$_country_lang["sv"] = 'السلفادور'; // El Salvador
$_country_lang["sc"] = 'سانت مارتن (الجزء الهولندي)'; // Sint Maarten (Dutch part)
$_country_lang["sx"] = 'سانت مارتن (الجزء الهولندي)'; // Sint Maarten (Dutch part)
$_country_lang["sy"] = 'الجمهورية العربية السورية'; // Syrian Arab Republic
$_country_lang["sz"] = 'سويسرا'; // Swaziland

Expand Down
2 changes: 1 addition & 1 deletion core/lexicon/country/be.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@
$_country_lang["ss"] = 'Паўднёвы Судан'; // South Sudan
$_country_lang["st"] = 'Сан-Томе і Прынсэп'; // Sao Tome and Principe
$_country_lang["sv"] = 'Сальвадор'; // El Salvador
$_country_lang["sc"] = 'Сінт-Маартен (Галандская частка)'; // Sint Maarten (Dutch part)
$_country_lang["sx"] = 'Сінт-Маартен (Галандская частка)'; // Sint Maarten (Dutch part)
$_country_lang["sy"] = 'Сірыя'; // Syrian Arab Republic
$_country_lang["sz"] = 'Свазіленд'; // Swaziland

Expand Down
2 changes: 1 addition & 1 deletion core/lexicon/country/bg.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@
$_country_lang["ss"] = 'South Sudan'; // South Sudan
$_country_lang["st"] = 'Сао Томе и Принсипи'; // Sao Tome and Principe
$_country_lang["sv"] = 'Салвадор'; // El Salvador
$_country_lang["sc"] = 'Sint Maarten (Dutch part)'; // Sint Maarten (Dutch part)
$_country_lang["sx"] = 'Sint Maarten (Dutch part)'; // Sint Maarten (Dutch part)
$_country_lang["sy"] = 'Сирия '; // Syrian Arab Republic
$_country_lang["sz"] = 'Свазиленд'; // Swaziland

Expand Down
2 changes: 1 addition & 1 deletion core/lexicon/country/cs.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@
$_country_lang["ss"] = 'Jižní Súdán'; // South Sudan
$_country_lang["st"] = 'Svatý Tomáš a Princův ostrov'; // Sao Tome and Principe
$_country_lang["sv"] = 'Salvador'; // El Salvador
$_country_lang["sc"] = 'Saint Maarten (nizozemská část)'; // Sint Maarten (Dutch part)
$_country_lang["sx"] = 'Saint Maarten (nizozemská část)'; // Sint Maarten (Dutch part)
$_country_lang["sy"] = 'Sjednocená arabská republika'; // Syrian Arab Republic
$_country_lang["sz"] = 'Svazijsko'; // Swaziland

Expand Down
2 changes: 1 addition & 1 deletion core/lexicon/country/da.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@
$_country_lang["ss"] = 'South Sudan'; // South Sudan
$_country_lang["st"] = 'Sao Tome og Principe'; // Sao Tome and Principe
$_country_lang["sv"] = 'El Salvador'; // El Salvador
$_country_lang["sc"] = 'Sint Maarten (Dutch part)'; // Sint Maarten (Dutch part)
$_country_lang["sx"] = 'Sint Maarten (Dutch part)'; // Sint Maarten (Dutch part)
$_country_lang["sy"] = 'Syrien'; // Syrian Arab Republic
$_country_lang["sz"] = 'Swaziland'; // Swaziland

Expand Down
2 changes: 1 addition & 1 deletion core/lexicon/country/de.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@
$_country_lang["ss"] = 'Südsudan'; // South Sudan
$_country_lang["st"] = 'São Tomé und Principe'; // Sao Tome and Principe
$_country_lang["sv"] = 'El Salvador'; // El Salvador
$_country_lang["sc"] = 'Sint Maarten (niederländischer Teil)'; // Sint Maarten (Dutch part)
$_country_lang["sx"] = 'Sint Maarten (niederländischer Teil)'; // Sint Maarten (Dutch part)
$_country_lang["sy"] = 'Syrien'; // Syrian Arab Republic
$_country_lang["sz"] = 'Swasiland'; // Swaziland

Expand Down
2 changes: 1 addition & 1 deletion core/lexicon/country/el.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@
$_country_lang["ss"] = 'Νότιο Σουδάν'; // South Sudan
$_country_lang["st"] = 'Σάο Τομέ και Πρίνσιπε'; // Sao Tome and Principe
$_country_lang["sv"] = 'Ελ Σαλβαδόρ'; // El Salvador
$_country_lang["sc"] = 'Άγιος Μαρτίνος (Ολλανδικό τμήμα)'; // Sint Maarten (Dutch part)
$_country_lang["sx"] = 'Άγιος Μαρτίνος (Ολλανδικό τμήμα)'; // Sint Maarten (Dutch part)
$_country_lang["sy"] = 'Αραβική Δημοκρατία της Συρίας'; // Syrian Arab Republic
$_country_lang["sz"] = 'Σουαζιλάνδη'; // Swaziland

Expand Down
2 changes: 1 addition & 1 deletion core/lexicon/country/en.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@
$_country_lang["ss"] = 'South Sudan'; // South Sudan
$_country_lang["st"] = 'Sao Tome and Principe'; // Sao Tome and Principe
$_country_lang["sv"] = 'El Salvador'; // El Salvador
$_country_lang["sc"] = 'Sint Maarten (Dutch part)'; // Sint Maarten (Dutch part)
$_country_lang["sx"] = 'Sint Maarten (Dutch part)'; // Sint Maarten (Dutch part)
$_country_lang["sy"] = 'Syrian Arab Republic'; // Syrian Arab Republic
$_country_lang["sz"] = 'Swaziland'; // Swaziland

Expand Down
2 changes: 1 addition & 1 deletion core/lexicon/country/es.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@
$_country_lang["ss"] = 'South Sudan'; // South Sudan
$_country_lang["st"] = 'Santo Tomé y Príncipe'; // Sao Tome and Principe
$_country_lang["sv"] = 'El Salvador'; // El Salvador
$_country_lang["sc"] = 'Sint Maarten (Dutch part)'; // Sint Maarten (Dutch part)
$_country_lang["sx"] = 'Sint Maarten (Dutch part)'; // Sint Maarten (Dutch part)
$_country_lang["sy"] = 'Siria'; // Syrian Arab Republic
$_country_lang["sz"] = 'Suazilandia'; // Swaziland

Expand Down
2 changes: 1 addition & 1 deletion core/lexicon/country/et.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@
$_country_lang["ss"] = 'South Sudan'; // South Sudan
$_country_lang["st"] = 'São Tomé ja Príncipe'; // Sao Tome and Principe
$_country_lang["sv"] = 'El Salvador'; // El Salvador
$_country_lang["sc"] = 'Sint Maarten (Dutch part)'; // Sint Maarten (Dutch part)
$_country_lang["sx"] = 'Sint Maarten (Dutch part)'; // Sint Maarten (Dutch part)
$_country_lang["sy"] = 'Süüria Araabia Vabariik'; // Syrian Arab Republic
$_country_lang["sz"] = 'Svaasimaa'; // Swaziland

Expand Down
2 changes: 1 addition & 1 deletion core/lexicon/country/fa.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@
$_country_lang["ss"] = 'South Sudan'; // South Sudan
$_country_lang["st"] = 'سائو تومه و پرنسیپ'; // Sao Tome and Principe
$_country_lang["sv"] = 'السالوادور'; // El Salvador
$_country_lang["sc"] = 'Sint Maarten (Dutch part)'; // Sint Maarten (Dutch part)
$_country_lang["sx"] = 'Sint Maarten (Dutch part)'; // Sint Maarten (Dutch part)
$_country_lang["sy"] = 'سوریه'; // Syrian Arab Republic
$_country_lang["sz"] = 'سوازیلند'; // Swaziland

Expand Down
2 changes: 1 addition & 1 deletion core/lexicon/country/fi.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@
$_country_lang["ss"] = 'South Sudan'; // South Sudan
$_country_lang["st"] = 'Salomonsaaret'; // Sao Tome and Principe
$_country_lang["sv"] = 'El Salvador'; // El Salvador
$_country_lang["sc"] = 'Sint Maarten (Dutch part)'; // Sint Maarten (Dutch part)
$_country_lang["sx"] = 'Sint Maarten (Dutch part)'; // Sint Maarten (Dutch part)
$_country_lang["sy"] = 'Syyria'; // Syrian Arab Republic
$_country_lang["sz"] = 'Swazimaa'; // Swaziland

Expand Down
2 changes: 1 addition & 1 deletion core/lexicon/country/fr.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@
$_country_lang["ss"] = 'Sud-Soudan'; // South Sudan
$_country_lang["st"] = 'Sao Tome et Principe'; // Sao Tome and Principe
$_country_lang["sv"] = 'Salvador'; // El Salvador
$_country_lang["sc"] = 'Saint-Martin (partie néerlandaise)'; // Sint Maarten (Dutch part)
$_country_lang["sx"] = 'Saint-Martin (partie néerlandaise)'; // Sint Maarten (Dutch part)
$_country_lang["sy"] = 'Syrie'; // Syrian Arab Republic
$_country_lang["sz"] = 'Swaziland'; // Swaziland

Expand Down
2 changes: 1 addition & 1 deletion core/lexicon/country/he.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@
$_country_lang["ss"] = 'South Sudan'; // South Sudan
$_country_lang["st"] = 'סאו טומה ופרינסיפה'; // Sao Tome and Principe
$_country_lang["sv"] = 'אל סלבדור'; // El Salvador
$_country_lang["sc"] = 'Sint Maarten (Dutch part)'; // Sint Maarten (Dutch part)
$_country_lang["sx"] = 'Sint Maarten (Dutch part)'; // Sint Maarten (Dutch part)
$_country_lang["sy"] = 'הרפובליקה הערבית הסורית'; // Syrian Arab Republic
$_country_lang["sz"] = 'סווזילנד'; // Swaziland

Expand Down
2 changes: 1 addition & 1 deletion core/lexicon/country/hi.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@
$_country_lang["ss"] = 'South Sudan'; // South Sudan
$_country_lang["st"] = 'साओ टोम और प्रिंसिपे'; // Sao Tome and Principe
$_country_lang["sv"] = 'अल साल्वाडोर'; // El Salvador
$_country_lang["sc"] = 'Sint Maarten (Dutch part)'; // Sint Maarten (Dutch part)
$_country_lang["sx"] = 'Sint Maarten (Dutch part)'; // Sint Maarten (Dutch part)
$_country_lang["sy"] = 'सीरियाई अरब गणराज्य'; // Syrian Arab Republic
$_country_lang["sz"] = 'स्वाज़ीलैंड'; // Swaziland

Expand Down
2 changes: 1 addition & 1 deletion core/lexicon/country/hu.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@
$_country_lang["ss"] = 'Dél-szudáni Köztársaság'; // South Sudan
$_country_lang["st"] = 'São Tomé és Príncipe'; // Sao Tome and Principe
$_country_lang["sv"] = 'El Salvador'; // El Salvador
$_country_lang["sc"] = 'Sint Maarten'; // Sint Maarten (Dutch part)
$_country_lang["sx"] = 'Sint Maarten'; // Sint Maarten (Dutch part)
$_country_lang["sy"] = 'Szíria'; // Syrian Arab Republic
$_country_lang["sz"] = 'Szváziföld'; // Swaziland

Expand Down
2 changes: 1 addition & 1 deletion core/lexicon/country/id.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@
$_country_lang["ss"] = 'Sudan Selatan'; // South Sudan
$_country_lang["st"] = 'Sao Tome dan Principe, Republik'; // Sao Tome and Principe
$_country_lang["sv"] = 'El Salvador'; // El Salvador
$_country_lang["sc"] = 'Saint Maarten (Wilayah Belanda)'; // Sint Maarten (Dutch part)
$_country_lang["sx"] = 'Saint Maarten (Wilayah Belanda)'; // Sint Maarten (Dutch part)
$_country_lang["sy"] = 'Syria'; // Syrian Arab Republic
$_country_lang["sz"] = 'Swazilandia'; // Swaziland

Expand Down
2 changes: 1 addition & 1 deletion core/lexicon/country/it.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@
$_country_lang["ss"] = 'Sudan del Sud'; // South Sudan
$_country_lang["st"] = 'Sao Tome e Principe'; // Sao Tome and Principe
$_country_lang["sv"] = 'El Salvador'; // El Salvador
$_country_lang["sc"] = 'Saint Maarten (parte Olandese)'; // Sint Maarten (Dutch part)
$_country_lang["sx"] = 'Saint Maarten (parte Olandese)'; // Sint Maarten (Dutch part)
$_country_lang["sy"] = 'Siria'; // Syrian Arab Republic
$_country_lang["sz"] = 'Swaziland'; // Swaziland

Expand Down
2 changes: 1 addition & 1 deletion core/lexicon/country/ja.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@
$_country_lang["ss"] = '南スーダン'; // South Sudan
$_country_lang["st"] = 'サントメ・プリンシペ'; // Sao Tome and Principe
$_country_lang["sv"] = 'エルサルバドル'; // El Salvador
$_country_lang["sc"] = 'シント ・ マールテン島 (オランダの一部)'; // Sint Maarten (Dutch part)
$_country_lang["sx"] = 'シント ・ マールテン島 (オランダの一部)'; // Sint Maarten (Dutch part)
$_country_lang["sy"] = 'シリア'; // Syrian Arab Republic
$_country_lang["sz"] = 'スワジランド'; // Swaziland

Expand Down
2 changes: 1 addition & 1 deletion core/lexicon/country/nl.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@
$_country_lang["ss"] = 'Zuid-Soedan'; // South Sudan
$_country_lang["st"] = 'Sao Tomé en Principe'; // Sao Tome and Principe
$_country_lang["sv"] = 'El Salvador'; // El Salvador
$_country_lang["sc"] = 'Sint Maarten (Nederlands deel)'; // Sint Maarten (Dutch part)
$_country_lang["sx"] = 'Sint Maarten (Nederlands deel)'; // Sint Maarten (Dutch part)
$_country_lang["sy"] = 'Syrië'; // Syrian Arab Republic
$_country_lang["sz"] = 'Swaziland'; // Swaziland

Expand Down
2 changes: 1 addition & 1 deletion core/lexicon/country/pt-br.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@
$_country_lang["ss"] = 'Sudão do Sul'; // South Sudan
$_country_lang["st"] = 'São Tomé e Príncipe'; // Sao Tome and Principe
$_country_lang["sv"] = 'El Salvador'; // El Salvador
$_country_lang["sc"] = 'São Martim (Parte Holandesa)'; // Sint Maarten (Dutch part)
$_country_lang["sx"] = 'São Martim (Parte Holandesa)'; // Sint Maarten (Dutch part)
$_country_lang["sy"] = 'Síria'; // Syrian Arab Republic
$_country_lang["sz"] = 'Swuzilândia'; // Swaziland

Expand Down
2 changes: 1 addition & 1 deletion core/lexicon/country/ro.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@
$_country_lang["ss"] = 'South Sudan'; // South Sudan
$_country_lang["st"] = 'São Tomé și Principe'; // Sao Tome and Principe
$_country_lang["sv"] = 'El Salvador'; // El Salvador
$_country_lang["sc"] = 'Sint Maarten (Dutch part)'; // Sint Maarten (Dutch part)
$_country_lang["sx"] = 'Sint Maarten (Dutch part)'; // Sint Maarten (Dutch part)
$_country_lang["sy"] = 'Siria'; // Syrian Arab Republic
$_country_lang["sz"] = 'Swaziland'; // Swaziland

Expand Down
2 changes: 1 addition & 1 deletion core/lexicon/country/ru.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@
$_country_lang["ss"] = 'Южный Судан'; // South Sudan
$_country_lang["st"] = 'Сан-Томе и Принсипи'; // Sao Tome and Principe
$_country_lang["sv"] = 'Сальвадор'; // El Salvador
$_country_lang["sc"] = 'Синт-Мартен (владение Нидерландов)'; // Sint Maarten (Dutch part)
$_country_lang["sx"] = 'Синт-Мартен (владение Нидерландов)'; // Sint Maarten (Dutch part)
$_country_lang["sy"] = 'Сирийская Арабская Республика'; // Syrian Arab Republic
$_country_lang["sz"] = 'Свазиленд'; // Swaziland

Expand Down
2 changes: 1 addition & 1 deletion core/lexicon/country/sv.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@
$_country_lang["ss"] = 'Sydsudan'; // South Sudan
$_country_lang["st"] = 'Sao Tome och Principe'; // Sao Tome and Principe
$_country_lang["sv"] = 'El Salvador'; // El Salvador
$_country_lang["sc"] = 'Sint Maarten (nederländska delen)'; // Sint Maarten (Dutch part)
$_country_lang["sx"] = 'Sint Maarten (nederländska delen)'; // Sint Maarten (Dutch part)
$_country_lang["sy"] = 'Syrien'; // Syrian Arab Republic
$_country_lang["sz"] = 'Swaziland'; // Swaziland

Expand Down
2 changes: 1 addition & 1 deletion core/lexicon/country/th.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@
$_country_lang["ss"] = 'South Sudan'; // South Sudan
$_country_lang["st"] = 'สาธารณรัฐประชาธิปไตยเซาตูเมและปรินซิปี'; // Sao Tome and Principe
$_country_lang["sv"] = 'สาธารณรัฐเอลซัลวาดอร์'; // El Salvador
$_country_lang["sc"] = 'Sint Maarten (Dutch part)'; // Sint Maarten (Dutch part)
$_country_lang["sx"] = 'Sint Maarten (Dutch part)'; // Sint Maarten (Dutch part)
$_country_lang["sy"] = 'สาธารณรัฐอาหรับซีเรีย'; // Syrian Arab Republic
$_country_lang["sz"] = 'ราชอาณาจักรสวาซิแลนด์'; // Swaziland

Expand Down
2 changes: 1 addition & 1 deletion core/lexicon/country/uk.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@
$_country_lang["ss"] = 'South Sudan'; // South Sudan
$_country_lang["st"] = 'Сан-Томе і Прінсіпі'; // Sao Tome and Principe
$_country_lang["sv"] = 'Сальвадор'; // El Salvador
$_country_lang["sc"] = 'Sint Maarten (Dutch part)'; // Sint Maarten (Dutch part)
$_country_lang["sx"] = 'Sint Maarten (Dutch part)'; // Sint Maarten (Dutch part)
$_country_lang["sy"] = 'Сирія'; // Syrian Arab Republic
$_country_lang["sz"] = 'Свазіленд'; // Swaziland

Expand Down
2 changes: 1 addition & 1 deletion core/lexicon/country/zh.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@
$_country_lang["ss"] = 'South Sudan'; // South Sudan
$_country_lang["st"] = '圣多美和普林西比'; // Sao Tome and Principe
$_country_lang["sv"] = '萨尔瓦多'; // El Salvador
$_country_lang["sc"] = 'Sint Maarten (Dutch part)'; // Sint Maarten (Dutch part)
$_country_lang["sx"] = 'Sint Maarten (Dutch part)'; // Sint Maarten (Dutch part)
$_country_lang["sy"] = '叙利亚'; // Syrian Arab Republic
$_country_lang["sz"] = '斯威士兰'; // Swaziland

Expand Down
2 changes: 1 addition & 1 deletion core/model/modx/error/moderror.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ public function success($message = '', $object = null) {
public function toArray($object) {
$array = array ();
if (is_array($object)) {
while (list ($key, $value) = each($object)) {
foreach ($object as $key => $value) {
if (!is_resource($value)) {
if (is_object($value) || is_array($value)) {
$array[$key] = $this->toArray($value);
Expand Down
2 changes: 1 addition & 1 deletion core/model/modx/mail/modmail.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ public function header($header) {
*/
public function send(array $attributes= array()) {
if (is_array($attributes)) {
while (list($attrKey, $attrVal) = each($attributes)) {
foreach ($attributes as $attrKey => $attrVal) {
$this->set($attrKey, $attrVal);
}
}
Expand Down
2 changes: 1 addition & 1 deletion core/model/modx/modelement.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ public function getTag() {
if (empty($this->_tag)) {
$propTemp = array();
if (empty($this->_propertyString) && !empty($this->_properties)) {
while(list($key, $value) = each($this->_properties)) {
foreach ($this->_properties as $key => $value) {
if (is_scalar($value)) {
$propTemp[] = trim($key) . '=`' . $value . '`';
}
Expand Down
2 changes: 1 addition & 1 deletion core/model/modx/modparser.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -825,7 +825,7 @@ public function getTag() {
if (empty($this->_tag) && ($name = $this->get('name'))) {
$propTemp = array();
if (empty($this->_propertyString) && !empty($this->_properties)) {
while(list($key, $value) = each($this->_properties)) {
foreach ($this->_properties as $key => $value) {
$propTemp[] = trim($key) . '=`' . $value . '`';
}
if (!empty($propTemp)) {
Expand Down
8 changes: 3 additions & 5 deletions core/model/modx/modx.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ class modX extends xPDO {
*/
public static function protect() {
if (@ ini_get('register_globals') && isset ($_REQUEST)) {
while (list($key, $value)= each($_REQUEST)) {
foreach ($_REQUEST as $key => $value) {
$GLOBALS[$key] = null;
unset ($GLOBALS[$key]);
}
Expand Down Expand Up @@ -1133,8 +1133,7 @@ public function sendForward($id, $options = null) {
)
);
if (!empty($this->resource->_fields)) {
reset($this->resource->_fields);
while (list($fkey, $fval) = each($this->resource->_fields)) {
foreach ($this->resource->_fields as $fkey => $fval) {
if (!in_array($fkey, $excludes)) {
if (is_scalar($fval) && $fval !== '') {
$currentResource[$fkey] = $fval;
Expand Down Expand Up @@ -1850,8 +1849,7 @@ public function parseChunk($chunkName, $chunkArr, $prefix='[[+', $suffix=']]') {
$chunk= $this->getChunk($chunkName);
if (!empty($chunk) || $chunk === '0') {
if(is_array($chunkArr)) {
reset($chunkArr);
while (list($key, $value)= each($chunkArr)) {
foreach ($chunkArr as $key => $value) {
$chunk= str_replace($prefix.$key.$suffix, $value, $chunk);
}
}
Expand Down
2 changes: 1 addition & 1 deletion core/model/modx/processors/resource/create.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ public function addTemplateVariables() {
/* handles checkboxes & multiple selects elements */
if (is_array($value)) {
$featureInsert = array();
while (list($featureValue, $featureItem) = each($value)) {
foreach ($value as $featureValue => $featureItem) {
$featureInsert[count($featureInsert)] = $featureItem;
}
$value = implode('||',$featureInsert);
Expand Down
2 changes: 1 addition & 1 deletion core/model/modx/processors/resource/reload.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public function process() {
/* handles checkboxes & multiple selects elements */
if (is_array($value)) {
$featureInsert = array();
while (list($featureValue, $featureItem) = each($value)) {
foreach ($value as $featureValue => $featureItem) {
if(empty($featureItem)) { continue; }
$featureInsert[count($featureInsert)] = $featureItem;
}
Expand Down
2 changes: 1 addition & 1 deletion core/model/modx/processors/resource/update.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,7 @@ public function saveTemplateVariables() {
/* handles checkboxes & multiple selects elements */
if (is_array($value)) {
$featureInsert = array();
while (list($featureValue, $featureItem) = each($value)) {
foreach ($value as $featureValue => $featureItem) {
if (isset($featureItem) && $featureItem === '') {
continue;
}
Expand Down
2 changes: 1 addition & 1 deletion core/model/modx/smarty/modsmarty.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public function setCachePath($path = '') {
public function setTemplatePath($path = '') {
if ($path == '') return false;

$this->template_dir = $path;
$this->setTemplateDir($path);
return true;
}

Expand Down
Loading

0 comments on commit 0acaf39

Please sign in to comment.