Skip to content
Snippets Groups Projects

php8 only; added variable types; short array syntax; remove glyphicons

Merged Hahn Axel (hahn) requested to merge 7359-update-php83 into master
1 file
+ 7
6
Compare changes
  • Side-by-side
  • Inline
@@ -9,6 +9,10 @@
* <VALUE> matches /^[a-z]*$/
* <code>queryparam::get('page', '/^[a-z]*$/');</code>
*
* Ideas:
* - add more type validation
* - add regex param with chars to remove eg /[^a-z]/ to keep only lowercase letters
*
* Axel <axel.hahn@unibe.ch>
* 2024-08-29 Axel php8 only; added variable types; short array syntax
*/
@@ -82,12 +86,9 @@ class queryparam
}
// set it to POST or GET variable
$aScope = isset($_POST[$sVarname]) && $_POST[$sVarname]
? $_POST[$sVarname]
: ((isset($_GET[$sVarname]) && $_GET[$sVarname])
? $_GET[$sVarname]
: false
)
$aScope = isset($_POST[$sVarname])
? $_POST
: $_GET
;
return self::getvar($aScope, $sVarname, $sRegexMatch, $sType);
Loading