File flexiciel.patch of Package php7.4-ZendFramework-Flexiciel
diff -Naur ZendFramework-1.12.20/library/Zend/Cache/Backend.php ZendFramework-Flexiciel/library/Zend/Cache/Backend.php
--- ZendFramework-1.12.20/library/Zend/Cache/Backend.php 2016-09-08 17:00:31.000000000 +0200
+++ ZendFramework-Flexiciel/library/Zend/Cache/Backend.php 2024-11-26 18:14:25.858904416 +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 ZendFramework-1.12.20/library/Zend/Form.php ZendFramework-Flexiciel/library/Zend/Form.php
--- ZendFramework-1.12.20/library/Zend/Form.php 2016-09-08 17:00:31.000000000 +0200
+++ ZendFramework-Flexiciel/library/Zend/Form.php 2024-11-26 18:18:14.718900367 +0100
@@ -1170,7 +1170,7 @@
} else {
switch ($argc) {
case 0:
- continue;
+ continue 2;
case (1 <= $argc):
$type = array_shift($spec);
case (2 <= $argc):
@@ -1687,7 +1687,7 @@
$order = null;
switch ($argc) {
case 0:
- continue;
+ continue 2;
case (1 <= $argc):
$subForm = array_shift($spec);
diff -Naur ZendFramework-1.12.20/library/Zend/Registry.php ZendFramework-Flexiciel/library/Zend/Registry.php
--- ZendFramework-1.12.20/library/Zend/Registry.php 2016-09-08 17:00:31.000000000 +0200
+++ ZendFramework-Flexiciel/library/Zend/Registry.php 2024-11-26 18:17:14.746901428 +0100
@@ -203,7 +203,7 @@
*/
public function offsetExists($index)
{
- return array_key_exists($index, $this);
+ return array_key_exists($index, $this::getArrayCopy());
}
}
diff -Naur ZendFramework-1.12.20/library/Zend/Validate/Abstract.php ZendFramework-Flexiciel/library/Zend/Validate/Abstract.php
--- ZendFramework-1.12.20/library/Zend/Validate/Abstract.php 2016-09-08 17:00:31.000000000 +0200
+++ ZendFramework-Flexiciel/library/Zend/Validate/Abstract.php 2024-11-26 18:14:25.858904416 +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 ZendFramework-1.12.20/library/Zend/Validate/File/Upload.php ZendFramework-Flexiciel/library/Zend/Validate/File/Upload.php
--- ZendFramework-1.12.20/library/Zend/Validate/File/Upload.php 2016-09-08 17:00:31.000000000 +0200
+++ ZendFramework-Flexiciel/library/Zend/Validate/File/Upload.php 2024-11-26 18:14:25.858904416 +0100
@@ -223,7 +223,7 @@
}
}
- if (count($this->_messages) > 0) {
+ if ($this->_messages && count($this->_messages) > 0) {
return false;
} else {
return true;
diff -Naur ZendFramework-1.12.20/library/Zend/View/Helper/HeadLink.php ZendFramework-Flexiciel/library/Zend/View/Helper/HeadLink.php
--- ZendFramework-1.12.20/library/Zend/View/Helper/HeadLink.php 2016-09-08 17:00:31.000000000 +0200
+++ ZendFramework-Flexiciel/library/Zend/View/Helper/HeadLink.php 2024-11-26 18:16:36.570902103 +0100
@@ -401,7 +401,11 @@
$extras = (array) $extras;
}
- $attributes = compact('rel', 'type', 'href', 'media', 'conditionalStylesheet', 'extras');
+ if (isset($extras)) {
+ $attributes = compact('rel', 'type', 'href', 'media', 'conditionalStylesheet', 'extras');
+ } else {
+ $attributes = compact('rel', 'type', 'href', 'media', 'conditionalStylesheet');
+ }
return $this->createData($this->_applyExtras($attributes));
}