Added “intness” check on values from “tag trands history”
This commit is contained in:
parent
b8e84c72c5
commit
0c2f4e6b27
1 changed files with 1 additions and 1 deletions
|
@ -696,7 +696,7 @@ if (isset($idata['trends']) && is_array($idata['trends'])) {
|
|||
$trend=0;
|
||||
foreach ($buf['history'] as $row) {
|
||||
// below, we check for "stringness" because, they should be integers, but they are strings
|
||||
if (isset($row['day']) && is_string($row['day']) && isset($row['uses']) && is_string($row['uses']) && isset($row['accounts']) && is_string($row['uses'])) {
|
||||
if (isset($row['day']) && is_string($row['day']) && preg_match('/^\d+$/',$row['day'])===1 && isset($row['uses']) && is_string($row['uses']) && preg_match('/^\d+$/',$row['uses'])===1 && isset($row['accounts']) && is_string($row['accounts']) && preg_match('/^\d+$/',$row['accounts'])===1) {
|
||||
$row['day']+=0;
|
||||
$row['uses']+=0;
|
||||
$row['accounts']+=0;
|
||||
|
|
Loading…
Reference in a new issue