File aareon.patch of Package php7-ZendFramework1.12
diff -Naur orig/library/Zend/Cache/Backend.php patched/library/Zend/Cache/Backend.php
--- orig/library/Zend/Cache/Backend.php 2016-09-08 17:00:31.000000000 +0200
+++ patched/library/Zend/Cache/Backend.php 2019-01-30 00:50:39.629479772 +0100
@@ -76,7 +76,9 @@
public function setDirectives($directives)
{
if (!is_array($directives)) Zend_Cache::throwException('Directives parameter must be an array');
- while (list($name, $value) = each($directives)) {
+ foreach ($directives as $key => $cval) {
+ $name = $key;
+ $value = $cval;
if (!is_string($name)) {
Zend_Cache::throwException("Incorrect option name : $name");
}
diff -Naur orig/library/Zend/Validate/Abstract.php patched/library/Zend/Validate/Abstract.php
--- orig/library/Zend/Validate/Abstract.php 2016-09-08 17:00:31.000000000 +0200
+++ patched/library/Zend/Validate/Abstract.php 2019-01-30 00:51:48.124252773 +0100
@@ -243,7 +243,7 @@
foreach ($this->_messageVariables as $ident => $property) {
$message = str_replace(
"%$ident%",
- implode(' ', (array) $this->$property),
+ implode(' ', [$this->$property]),
$message
);
}
diff -Naur orig/library/Zend/Validate/File/Upload.php patched/library/Zend/Validate/File/Upload.php
--- orig/library/Zend/Validate/File/Upload.php 2016-09-08 17:00:31.000000000 +0200
+++ patched/library/Zend/Validate/File/Upload.php 2019-01-30 00:52:55.926997034 +0100
@@ -223,7 +223,7 @@
}
}
- if (count($this->_messages) > 0) {
+ if ($this->_messages && count($this->_messages) > 0) {
return false;
} else {
return true;