<?php
namespace Friendica\Core;
+
+use dbm;
+
/**
* @file include/Core/Config.php
*
$a = get_app();
$r = q("SELECT `v`, `k` FROM `config` WHERE `cat` = '%s' ORDER BY `cat`, `k`, `id`", dbesc($family));
- if (count($r)) {
+ if (dbm::is_result($r)) {
foreach ($r as $rr) {
$k = $rr['k'];
if ($family === 'config') {
dbesc($family),
dbesc($key)
);
- if (count($ret)) {
+ if (dbm::is_result($ret)) {
// manage array value
$val = (preg_match("|^a:[0-9]+:{.*}$|s", $ret[0]['v'])?unserialize( $ret[0]['v']):$ret[0]['v']);
$a->config[$family][$key] = $val;