]> git.mxchange.org Git - friendica.git/commitdiff
More dbm::is_result() instead of count()
authorRoland Häder <roland@mxchange.org>
Wed, 14 Dec 2016 11:03:02 +0000 (12:03 +0100)
committerRoland Häder <roland@mxchange.org>
Wed, 14 Dec 2016 11:03:02 +0000 (12:03 +0100)
Signed-off-by: Roland Häder <roland@mxchange.org>
include/Core/Config.php
include/Core/PConfig.php
include/salmon.php
mod/dfrn_confirm.php

index 7b7045a9ee3ed2f3fe00989d97db6cba13e9959f..523572886457edb82971cd645ceb6ee42e03cb28 100644 (file)
@@ -97,7 +97,7 @@ class 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;
index 43735018e4ce143b2826ed61d61987d21cd9303e..49b69a1f7a2d814de21e87e9e6ba2ca2bd4fa430 100644 (file)
@@ -92,7 +92,7 @@ class PConfig {
                        dbesc($key)
                );
 
-               if (count($ret)) {
+               if (dbm::is_result($ret)) {
                        $val = (preg_match("|^a:[0-9]+:{.*}$|s", $ret[0]['v'])?unserialize( $ret[0]['v']):$ret[0]['v']);
                        $a->config[$uid][$family][$key] = $val;
 
index 5e9c4fa616dc1df20eec3c8d16ac372add35155e..c5c3d722371c9066ae0e7bcee1e76849008f3ed0 100644 (file)
@@ -24,7 +24,7 @@ function get_salmon_key($uri,$keyhash) {
        // We have found at least one key URL
        // If it's inline, parse it - otherwise get the key
 
-       if(count($ret)) {
+       if(count($ret) > 0) {
                for($x = 0; $x < count($ret); $x ++) {
                        if(substr($ret[$x],0,5) === 'data:') {
                                if(strstr($ret[$x],','))
index 23c62cb0ab25d127c8c0fd1037a6a998c69e5a03..df663f7cd4e285a5c33ccf7cb54016b8b89eff56 100644 (file)
@@ -584,7 +584,7 @@ function dfrn_confirm_post(&$a,$handsfree = null) {
                        dbesc($decrypted_source_url),
                        intval($local_uid)
                );
-               if(! count($ret)) {
+               if(! dbm::is_result($ret)) {
                        if(strstr($decrypted_source_url,'http:'))
                                $newurl = str_replace('http:','https:',$decrypted_source_url);
                        else
@@ -594,7 +594,7 @@ function dfrn_confirm_post(&$a,$handsfree = null) {
                                dbesc($newurl),
                                intval($local_uid)
                        );
-                       if(! count($ret)) {
+                       if(! dbm::is_result($ret)) {
                                // this is either a bogus confirmation (?) or we deleted the original introduction.
                                $message = t('Contact record was not found for you on our site.');
                                xml_status(3,$message);