Skip to content

Commit

Permalink
Update txplib_misc.php
Browse files Browse the repository at this point in the history
  • Loading branch information
bloatware committed May 12, 2021
1 parent d557bcf commit ffe047f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions textpattern/lib/txplib_misc.php
Original file line number Diff line number Diff line change
Expand Up @@ -3344,6 +3344,7 @@ function fetch_form($name, $theme = null)
$forms[$theme][$name] = callback_event('form.fetch', '', false, compact('name', 'skin', 'theme'));
}
} elseif ($fetch) {
$forms[$theme] += array_fill_keys($names, false);
$nameset = implode(',', quote_list($names));

if ($nameset and $rs = safe_rows_start('name, Form', 'txp_form', "name IN (".$nameset.") AND skin = '".doSlash($theme)."'")) {
Expand All @@ -3356,9 +3357,8 @@ function fetch_form($name, $theme = null)
}

foreach ($names as $form) {
if (!isset($forms[$theme][$form]) || $forms[$theme][$form] === false) {
if ($forms[$theme][$form] === false) {
trigger_error(gTxt('form_not_found').' '.$theme.'.'.$form);
$forms[$theme][$form] = false;
}
}
}
Expand Down

0 comments on commit ffe047f

Please sign in to comment.