mirror of
https://github.com/vrana/adminer.git
synced 2025-08-09 16:17:48 +02:00
Avoid each() not available in PHP 8
This commit is contained in:
@@ -849,19 +849,18 @@ function friendly_url($val) {
|
|||||||
/** Print hidden fields
|
/** Print hidden fields
|
||||||
* @param array
|
* @param array
|
||||||
* @param array
|
* @param array
|
||||||
|
* @param string
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
function hidden_fields($process, $ignore = array()) {
|
function hidden_fields($process, $ignore = array(), $prefix = '') {
|
||||||
$return = false;
|
$return = false;
|
||||||
while (list($key, $val) = each($process)) {
|
foreach ($process as $key => $val) {
|
||||||
if (!in_array($key, $ignore)) {
|
if (!in_array($key, $ignore)) {
|
||||||
if (is_array($val)) {
|
if (is_array($val)) {
|
||||||
foreach ($val as $k => $v) {
|
hidden_fields($val, array(), $key);
|
||||||
$process[$key . "[$k]"] = $v;
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
$return = true;
|
$return = true;
|
||||||
echo '<input type="hidden" name="' . h($key) . '" value="' . h($val) . '">';
|
echo '<input type="hidden" name="' . h($prefix ? $prefix . "[$key]" : $key) . '" value="' . h($val) . '">';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user