Ich habe die ver 1.0.3 heruntergeladen und auf meinem Testboard (phpbb 3.3.0 und php 7.4.7) installiert, dabei bekam ich folgende Warnhinweise:
Code: Alles auswählen
[phpBB Debug] PHP Notice: in file [ROOT]/ext/hjw/calendar/controller/main.php on line 96: Trying to access array offset on value of type bool
[phpBB Debug] PHP Notice: in file [ROOT]/ext/hjw/calendar/controller/main.php on line 267: Trying to access array offset on value of type bool
[phpBB Debug] PHP Notice: in file [ROOT]/ext/hjw/calendar/controller/main.php on line 267: Trying to access array offset on value of type bool
[phpBB Debug] PHP Notice: in file [ROOT]/ext/hjw/calendar/controller/main.php on line 267: Trying to access array offset on value of type bool
[phpBB Debug] PHP Notice: in file [ROOT]/ext/hjw/calendar/controller/main.php on line 267: Trying to access array offset on value of type bool
[phpBB Debug] PHP Notice: in file [ROOT]/ext/hjw/calendar/controller/main.php on line 267: Trying to access array offset on value of type bool
[phpBB Debug] PHP Notice: in file [ROOT]/ext/hjw/calendar/controller/main.php on line 267: Trying to access array offset on value of type bool
[phpBB Debug] PHP Notice: in file [ROOT]/ext/hjw/calendar/controller/main.php on line 267: Trying to access array offset on value of type bool
[phpBB Debug] PHP Notice: in file [ROOT]/ext/hjw/calendar/controller/main.php on line 267: Trying to access array offset on value of type bool
[phpBB Debug] PHP Notice: in file [ROOT]/ext/hjw/calendar/controller/main.php on line 267: Trying to access array offset on value of type bool
[phpBB Debug] PHP Notice: in file [ROOT]/ext/hjw/calendar/controller/main.php on line 267: Trying to access array offset on value of type bool
[phpBB Debug] PHP Notice: in file [ROOT]/ext/hjw/calendar/controller/main.php on line 267: Trying to access array offset on value of type bool
[phpBB Debug] PHP Notice: in file [ROOT]/ext/hjw/calendar/controller/main.php on line 267: Trying to access array offset on value of type bool
[phpBB Debug] PHP Notice: in file [ROOT]/ext/hjw/calendar/controller/main.php on line 267: Trying to access array offset on value of type bool
[phpBB Debug] PHP Notice: in file [ROOT]/ext/hjw/calendar/controller/main.php on line 267: Trying to access array offset on value of type bool
[phpBB Debug] PHP Notice: in file [ROOT]/ext/hjw/calendar/controller/main.php on line 267: Trying to access array offset on value of type bool
[phpBB Debug] PHP Notice: in file [ROOT]/ext/hjw/calendar/controller/main.php on line 267: Trying to access array offset on value of type bool
[phpBB Debug] PHP Notice: in file [ROOT]/ext/hjw/calendar/controller/main.php on line 267: Trying to access array offset on value of type bool
[phpBB Debug] PHP Notice: in file [ROOT]/ext/hjw/calendar/controller/main.php on line 267: Trying to access array offset on value of type bool
[phpBB Debug] PHP Notice: in file [ROOT]/ext/hjw/calendar/controller/main.php on line 267: Trying to access array offset on value of type bool
[phpBB Debug] PHP Notice: in file [ROOT]/ext/hjw/calendar/controller/main.php on line 267: Trying to access array offset on value of type bool
[phpBB Debug] PHP Notice: in file [ROOT]/ext/hjw/calendar/controller/main.php on line 267: Trying to access array offset on value of type bool
[phpBB Debug] PHP Notice: in file [ROOT]/ext/hjw/calendar/controller/main.php on line 267: Trying to access array offset on value of type bool
[phpBB Debug] PHP Notice: in file [ROOT]/ext/hjw/calendar/controller/main.php on line 267: Trying to access array offset on value of type bool
[phpBB Debug] PHP Notice: in file [ROOT]/ext/hjw/calendar/controller/main.php on line 267: Trying to access array offset on value of type bool
[phpBB Debug] PHP Notice: in file [ROOT]/ext/hjw/calendar/controller/main.php on line 267: Trying to access array offset on value of type bool
[phpBB Debug] PHP Notice: in file [ROOT]/ext/hjw/calendar/controller/main.php on line 267: Trying to access array offset on value of type bool
[phpBB Debug] PHP Notice: in file [ROOT]/ext/hjw/calendar/controller/main.php on line 267: Trying to access array offset on value of type bool
[phpBB Debug] PHP Notice: in file [ROOT]/ext/hjw/calendar/controller/main.php on line 267: Trying to access array offset on value of type bool
[phpBB Debug] PHP Notice: in file [ROOT]/ext/hjw/calendar/controller/main.php on line 267: Trying to access array offset on value of type bool
[phpBB Debug] PHP Notice: in file [ROOT]/ext/hjw/calendar/controller/main.php on line 267: Trying to access array offset on value of type bool
[phpBB Debug] PHP Notice: in file [ROOT]/ext/hjw/calendar/controller/main.php on line 267: Trying to access array offset on value of type bool
[phpBB Debug] PHP Notice: in file [ROOT]/ext/hjw/calendar/controller/main.php on line 267: Trying to access array offset on value of type bool
[phpBB Debug] PHP Notice: in file [ROOT]/ext/hjw/calendar/controller/main.php on line 267: Trying to access array offset on value of type bool
[phpBB Debug] PHP Notice: in file [ROOT]/ext/hjw/calendar/controller/main.php on line 267: Trying to access array offset on value of type bool
[phpBB Debug] PHP Notice: in file [ROOT]/ext/hjw/calendar/controller/main.php on line 267: Trying to access array offset on value of type bool
1[phpBB Debug] PHP Notice: in file [ROOT]/ext/hjw/calendar/event/main_listener.php on line 403: Trying to access array offset on value of type bool
Wenn ich mir das im Code ansehe, finde ich folgende Zeilen:
main.php, Zeile 96:
Code: Alles auswählen
$football = ($row['ext_active'] == 1) ? $this->get_config('football') : false;
main.php, Zeile 267:
und main_listener.php, Zeile 403
Code: Alles auswählen
$football = ($row['ext_active'] == 1) ? $football = $this->get_config('football') : 0;
In main.php, Zeile 96 und in main_listener.php, Zeile 403 wird versucht ein leeres Ergebnis (die Extension 'football/football' ist bei mir nicht installiert) abzufragen ($row['ext_active'] ist in php 7.4 leer) und somit läuft die Abfrage ins Leere bzw. verursacht eine Warnung.
Abhilfe schafft:
Code: Alles auswählen
$football = (!empty($row) && ($row['ext_active'] == 1)) ? $this->get_config('football') : false;
Die in der main.php in Zeile 267 verursachte Warnung ist wohl auf die main.php, Zeile 199 zurückzuführen, dort wird versucht, eine Variable mit dem Namen 'hjw_calendar_week_display' auszulesen, die es aber in der fraglichen Tabelle nicht gibt:
Code: Alles auswählen
$week =($this->get_config('hjw_calendar_week_display') == true) ? $week = date ("W", mktime (0, 0, 0, $month, $day, $year)) : false;
Ändert man diese Zeile ab in:
Code: Alles auswählen
$week =($this->get_config('week_display') == true) ? $week = date ("W", mktime (0, 0, 0, $month, $day, $year)) : false;
funktioniert alles ohne Hinweise
Und noch etwas ist mir aufgefallen:
In der main.php verwendest du in den Zeilen 98 - 109 die Variable
$this->user->lang
, die ist nach meiner Erinnerung deprecated und ab der nächsten Version von phpbb nicht mehr lauffähig, finde jetzt aber auf die Schnelle die Quelle nicht, vielleicht können unsere phpbb-Gurus etwas dazu sagen.
Ich möchte hier nochmal ausdrücklich betonen, dass ich deine Extension sehr gut finde und meine User sie schätzen gelernt haben, weil sie so ihre Events einfach verwalten können, zudem hat man so jederzeit einen guten Überblick, was im Forum mit Events und Geburtstagen ansteht.
Und ich weiß auch, wieviel Arbeit in einer Extension steckt und wie leicht man Code einbaut, der fehlerfrei zu funktionieren scheint, aber irgendwann aus einer unerwarteten Richtung auf einen einschlägt.