Merge branch 'rewrites/is_filled_array_introduced' of git://github.com/Quix0r/friendica into Quix0r-rewrites/is_filled_array_introduced
Conflicts: boot.php
This commit is contained in:
@@ -86,7 +86,7 @@ class ForumManager {
|
||||
$total = count($contacts);
|
||||
$visible_forums = 10;
|
||||
|
||||
if(count($contacts)) {
|
||||
if(dba::is_result($contacts)) {
|
||||
|
||||
$id = 0;
|
||||
|
||||
|
||||
+10
-1
@@ -230,6 +230,16 @@ class dba {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if $array is a filled array with at least one entry.
|
||||
*
|
||||
* @param $array mixed A filled array with at least one entry
|
||||
* @return Whether $array is a filled array
|
||||
*/
|
||||
public function is_result ($array) {
|
||||
return (is_array($array) && count($array) > 0);
|
||||
}
|
||||
|
||||
function __destruct() {
|
||||
if ($this->db)
|
||||
if($this->mysqli)
|
||||
@@ -340,4 +350,3 @@ function dbesc_array(&$arr) {
|
||||
function dba_timer() {
|
||||
return microtime(true);
|
||||
}
|
||||
|
||||
|
||||
@@ -232,6 +232,16 @@ class dba {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if $array is a filled array with at least one entry.
|
||||
*
|
||||
* @param $array mixed A filled array with at least one entry
|
||||
* @return Whether $array is a filled array
|
||||
*/
|
||||
public function is_result ($array) {
|
||||
return (is_array($array) && count($array) > 0);
|
||||
}
|
||||
|
||||
function __destruct() {
|
||||
if ($this->db)
|
||||
\DDDBL\disconnect();
|
||||
|
||||
+1
-1
@@ -228,7 +228,7 @@ function poller_max_connections_reached() {
|
||||
function poller_kill_stale_workers() {
|
||||
$r = q("SELECT `pid`, `executed` FROM `workerqueue` WHERE `executed` != '0000-00-00 00:00:00'");
|
||||
|
||||
if (!is_array($r) || count($r) == 0) {
|
||||
if (!dba::is_result($r)) {
|
||||
// No processing here needed
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user