From 6464e1b69ee96be71d9252cc1129644b6ec8e923 Mon Sep 17 00:00:00 2001 From: Matteo Nastasi Date: Sun, 13 Sep 2026 12:35:45 +0200 Subject: [PATCH] php8: the result of a call assigned by reference "Only variables should be assigned by reference": the return value of a function is not a variable, and none of the three methods called declares that it returns a reference. With objects the & has been useless since php 5, and every other place that calls get_user() already assigns without it. The Notice came out on every card played (briskin5's index_wr.php) and was invisible until the daemon log was cleaned up. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_014M1jiEq9cHdE5SE5j6vFuE --- web/Obj/auth.phh | 2 +- web/Obj/hardban.phh | 2 +- web/briskin5/index_wr.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/web/Obj/auth.phh b/web/Obj/auth.phh index d9b4528..cc6f93e 100644 --- a/web/Obj/auth.phh +++ b/web/Obj/auth.phh @@ -186,7 +186,7 @@ class Challenges { if ($chals == FALSE) { log_only("INIT CHALLENGES DATA"); - $chals =& Challenges::create(); + $chals = Challenges::create(); if (@shm_put_var($shm, $tok, $chals) == FALSE) { log_only("PUT_VAR FALLITA ".strlen(serialize($chals))); log_only(serialize($chals)); diff --git a/web/Obj/hardban.phh b/web/Obj/hardban.phh index 8b1c0ff..1982e90 100644 --- a/web/Obj/hardban.phh +++ b/web/Obj/hardban.phh @@ -179,7 +179,7 @@ class Hardbans { if ($hban == FALSE) { log_only("INIT HARDBAN DATA"); - $hban =& Hardbans::create(); + $hban = Hardbans::create(); if (@shm_put_var($shm, $tok, $hban) == FALSE) { log_only("PUT_VAR FALLITA ".strlen(serialize($hban))); log_only(serialize($hban)); diff --git a/web/briskin5/index_wr.php b/web/briskin5/index_wr.php index a82b39c..9c85d06 100644 --- a/web/briskin5/index_wr.php +++ b/web/briskin5/index_wr.php @@ -56,7 +56,7 @@ function bin5_index_wr_main(&$bin5, $remote_addr_full, $get, $post, $cookie) log_wr(0, 'bin::index_wr.php: COMM: '.xcapemesg($mesg)); - if (($user = &$bin5->get_user($sess, $idx)) == FALSE) { + if (($user = $bin5->get_user($sess, $idx)) == FALSE) { echo "Get User Error"; log_wr("Get User Error"); return FALSE; -- 2.47.3