Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

web: fix PHP8 deprecation warnings #5852

Merged
merged 1 commit into from
Oct 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading