aboutsummaryrefslogtreecommitdiffstats
path: root/include/account.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2021-03-03 12:39:41 +0000
committerMario <mario@mariovavti.com>2021-03-03 14:11:29 +0100
commit3d264f5a55f340e3c20c1181c8b4578abecf3f1c (patch)
tree6c5eba25568a65e7317588717df048042a45685a /include/account.php
parentfbb1d6aa41d9eb7a27b4a8bc79747ac0797db0c7 (diff)
downloadvolse-hubzilla-3d264f5a55f340e3c20c1181c8b4578abecf3f1c.tar.gz
volse-hubzilla-3d264f5a55f340e3c20c1181c8b4578abecf3f1c.tar.bz2
volse-hubzilla-3d264f5a55f340e3c20c1181c8b4578abecf3f1c.zip
php8: fix warnings during install procedure
(cherry picked from commit 48bae9d4219735bc44f4ee72228d19d3e6b9efc9)
Diffstat (limited to 'include/account.php')
-rw-r--r--include/account.php12
1 files changed, 7 insertions, 5 deletions
diff --git a/include/account.php b/include/account.php
index 34936c33f..fefe61d15 100644
--- a/include/account.php
+++ b/include/account.php
@@ -605,8 +605,8 @@ function account_approve($hash) {
*/
function downgrade_accounts() {
- $r = q("select * from account where not ( account_flags & %d ) > 0
- and account_expires > '%s'
+ $r = q("select * from account where not ( account_flags & %d ) > 0
+ and account_expires > '%s'
and account_expires < %s ",
intval(ACCOUNT_EXPIRED),
dbesc(NULL_DATE),
@@ -746,8 +746,8 @@ function service_class_fetch($uid, $property) {
$service_class = App::$account['account_service_class'];
}
else {
- $r = q("select account_service_class as service_class
- from channel c, account a
+ $r = q("select account_service_class as service_class
+ from channel c, account a
where c.channel_account_id=a.account_id and c.channel_id= %d limit 1",
intval($uid)
);
@@ -780,6 +780,8 @@ function service_class_fetch($uid, $property) {
*/
function account_service_class_fetch($aid, $property) {
+ $service_class = null;
+
$r = q("select account_service_class as service_class from account where account_id = %d limit 1",
intval($aid)
);
@@ -787,7 +789,7 @@ function account_service_class_fetch($aid, $property) {
$service_class = $r[0]['service_class'];
}
- if(! x($service_class))
+ if(! isset($service_class))
return false; // everything is allowed
$arr = get_config('service_class', $service_class);