aboutsummaryrefslogtreecommitdiffstats
path: root/include/account.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2021-03-03 13:39:41 +0100
committerMario <mario@mariovavti.com>2021-03-03 13:39:41 +0100
commit48bae9d4219735bc44f4ee72228d19d3e6b9efc9 (patch)
tree35acbc93564342ec3d836016d2d8c54291403f5b /include/account.php
parent55b4eb7b22fb699688e89a99b1370b8ee17af0d3 (diff)
downloadvolse-hubzilla-48bae9d4219735bc44f4ee72228d19d3e6b9efc9.tar.gz
volse-hubzilla-48bae9d4219735bc44f4ee72228d19d3e6b9efc9.tar.bz2
volse-hubzilla-48bae9d4219735bc44f4ee72228d19d3e6b9efc9.zip
php8: fix warnings during install procedure
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);