summaryrefslogtreecommitdiffstats
path: root/inc/property.inc.php
diff options
context:
space:
mode:
Diffstat (limited to 'inc/property.inc.php')
-rw-r--r--inc/property.inc.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/inc/property.inc.php b/inc/property.inc.php
index 1b979982..e7f4cd25 100644
--- a/inc/property.inc.php
+++ b/inc/property.inc.php
@@ -21,7 +21,7 @@ class Property
if (self::$cache === false) {
$NOW = time();
$res = Database::simpleQuery("SELECT name, dateline, value FROM property");
- while ($row = $res->fetch(PDO::FETCH_ASSOC)) {
+ foreach ($res as $row) {
if ($row['dateline'] != 0 && $row['dateline'] < $NOW)
continue;
self::$cache[$row['name']] = $row['value'];
@@ -71,7 +71,7 @@ class Property
$res = Database::simpleQuery("SELECT dateline, value FROM property_list WHERE name = :key", compact('key'));
$NOW = time();
$return = array();
- while ($row = $res->fetch(PDO::FETCH_ASSOC)) {
+ foreach ($res as $row) {
if ($row['dateline'] != 0 && $row['dateline'] < $NOW)
continue;
$return[] = $row['value'];