Skip to content

Commit

Permalink
Merge pull request #5852 from BOINC/dpa_php8_4
Browse files Browse the repository at this point in the history
web: fix PHP8 deprecation warnings
  • Loading branch information
AenBleidd authored Oct 21, 2024
2 parents 3bd7dcf + 7c4f7c9 commit 478ca1c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
10 changes: 10 additions & 0 deletions html/inc/forum_db.inc
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

require_once("../inc/boinc_db.inc");

#[AllowDynamicProperties]
class BoincCategory {
static function lookup_id($id) {
$db = BoincDb::get();
Expand All @@ -33,6 +34,7 @@ class BoincCategory {
}
}

#[AllowDynamicProperties]
class BoincForum {
static function insert($clause) {
$db = BoincDb::get();
Expand Down Expand Up @@ -62,6 +64,7 @@ class BoincForum {
}
}

#[AllowDynamicProperties]
class BoincThread {
static function insert($clause) {
$db = BoincDb::get();
Expand Down Expand Up @@ -92,6 +95,7 @@ class BoincThread {
}
}

#[AllowDynamicProperties]
class BoincPost {
static function insert($clause) {
$db = BoincDb::get();
Expand Down Expand Up @@ -132,6 +136,7 @@ class BoincPost {
}
}

#[AllowDynamicProperties]
class BoincForumPrefs {
static $cache;
static function lookup_userid($id) {
Expand Down Expand Up @@ -181,6 +186,7 @@ class BoincForumPrefs {
}
}

#[AllowDynamicProperties]
class BoincForumLogging {
static $cache;
static function replace($userid, $threadid, $timestamp) {
Expand Down Expand Up @@ -227,6 +233,7 @@ class BoincForumLogging {
}
}

#[AllowDynamicProperties]
class BoincSubscription {
static function lookup($userid, $threadid) {
$db = BoincDb::get();
Expand All @@ -246,6 +253,7 @@ class BoincSubscription {
}
}

#[AllowDynamicProperties]
class BoincPostRating {
static function lookup($userid, $postid) {
$db = BoincDb::get();
Expand All @@ -257,6 +265,7 @@ class BoincPostRating {
}
}

#[AllowDynamicProperties]
class BoincFriend {
static function insert($clause) {
$db = BoincDb::get();
Expand Down Expand Up @@ -289,6 +298,7 @@ class BoincFriend {
}
}

#[AllowDynamicProperties]
class BoincNotify {
static function insert($clause) {
$db = BoincDb::get();
Expand Down
4 changes: 2 additions & 2 deletions html/inc/pm.inc
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,8 @@ function pm_form_page($replyto, $userid, $error = null) {
$content = post_str("content", true);
}

$content = htmlspecialchars($content);
$subject = htmlspecialchars($subject);
$content = $content?htmlspecialchars($content):'';
$subject = $subject?htmlspecialchars($subject):'';

if ($error != null) {
echo "<p class=\"text-danger\">".$error."</p>\n";
Expand Down

0 comments on commit 478ca1c

Please sign in to comment.