]> mop.ddnsfree.com - git repositories - brisk.git/commitdiff
php8: the result of a call assigned by reference
authorMatteo Nastasi <nastasi@alternativeoutput.it>
Sun, 13 Sep 2026 10:35:45 +0000 (12:35 +0200)
committerMatteo Nastasi <nastasi@alternativeoutput.it>
Sun, 13 Sep 2026 10:35:45 +0000 (12:35 +0200)
"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) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014M1jiEq9cHdE5SE5j6vFuE

web/Obj/auth.phh
web/Obj/hardban.phh
web/briskin5/index_wr.php

index d9b45287368d9835722f150a0396f2c968165810..cc6f93e2dbc8ef72fc0de1e2129aad01d96f6d86 100644 (file)
@@ -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));
index 8b1c0ff6494e0ed44f5112cf1cbfc56e3d563d56..1982e90a223b46a0717e020d7bb0497a470ffe58 100644 (file)
@@ -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));
index a82b39c6834b706f60f281c008bd90b13e3052c8..9c85d06afd0b0b5334dfada495554263e7dd1ab1 100644 (file)
@@ -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;