Description
When phpBB debug mode is enabled, the following warning appears on page load:
[phpBB Debug] PHP Warning: in file [ROOT]/ext/avathar/recenttopicsav/event/listener.php on line 96: Undefined array key 1
This warning causes a cascade of "Cannot modify header information - headers already sent" errors because the warning outputs content before HTTP headers are sent.
likely issue
Line 96 in event/listener.php accesses $array[1] without first checking whether index 1 exists. This likely occurs when parsing a result set or splitting a string that returns fewer elements than expected.
Environment
- phpBB 3.3.x with debug mode enabled
Description
When phpBB debug mode is enabled, the following warning appears on page load:
This warning causes a cascade of "Cannot modify header information - headers already sent" errors because the warning outputs content before HTTP headers are sent.
likely issue
Line 96 in
event/listener.phpaccesses$array[1]without first checking whether index1exists. This likely occurs when parsing a result set or splitting a string that returns fewer elements than expected.Environment