Permalink
Browse files

is_int doesn't work as we'd like to, so replaced by is_numeric as wor…

…karound
  • Loading branch information...
1 parent 2eaa21a commit e8bc7b484f82fc4b3fcdc16d043a31c453a8d3c7 @chilek chilek committed Apr 28, 2012
Showing with 3 additions and 3 deletions.
  1. +1 −1 modules/customerwarn.php
  2. +2 −2 modules/nodewarn.php
View
@@ -32,7 +32,7 @@
$warnoff = isset($setwarnings['warnoff']) ? $setwarnings['warnoff'] : FALSE;
$message = isset($setwarnings['message']) ? $setwarnings['message'] : NULL;
- $cids = implode(',', array_values(array_filter($setwarnings['mcustomerid'], "is_int")));
+ $cids = implode(',', array_values(array_filter($setwarnings['mcustomerid'], 'is_numeric')));
if (!empty($cids)) {
$DB->Execute('UPDATE nodes SET warning = ? WHERE ownerid IN (' . $cids . ')',
array($warnon ? 1 : 0));
View
@@ -32,7 +32,7 @@
$warnon = isset($setwarnings['warnon']) ? $setwarnings['warnon'] : FALSE;
$warnoff = isset($setwarnings['warnoff']) ? $setwarnings['warnoff'] : FALSE;
- $nodes = array_values(array_filter($setwarnings['mnodeid'], "is_int"));
+ $nodes = array_values(array_filter($setwarnings['mnodeid'], 'is_numeric'));
if (!empty($nodes)) {
$DB->Execute('UPDATE nodes SET warning = ? WHERE id IN (' . implode(',', $nodes) . ')',
@@ -56,7 +56,7 @@
if (!empty($_POST['marks']))
{
- $nodes = array_values(array_filter($_POST['marks'], "is_int"));
+ $nodes = array_values(array_filter($_POST['marks'], 'is_numeric'));
$DB->Execute('UPDATE node SET warning = ? WHERE id IN (' . implode(',', $nodes) . ')',
array($warning));

0 comments on commit e8bc7b4

Please sign in to comment.