1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-03 09:49:28 +02:00
DanielnetoDotCom 2021-04-26 09:29:55 -03:00
parent a7c567d6e1
commit ab25a18648

View file

@ -78,7 +78,19 @@ foreach ($scanVars as $value) {
// all variables with _id at the end will be forced to be interger
foreach ($scanThis as $key => $value) {
if (preg_match('/_id$/i', $key)) {
if (is_numeric($value)) {
$scanThis[$key] = intval($value);
} else {
$json = json_decode($value);
if (is_array($json)) {
foreach ($json as $key => $value) {
$json[$key] = intval($value);
}
$scanThis[$key] = json_encode($json);
}else{
$scanThis[$key] = intval($value);
}
}
}
}