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

More PHP 8.2 warnings #4737

Closed
25 tasks
Stefan-MyBB opened this issue Jul 31, 2023 · 5 comments · Fixed by #4739
Closed
25 tasks

More PHP 8.2 warnings #4737

Stefan-MyBB opened this issue Jul 31, 2023 · 5 comments · Fixed by #4739
Labels
b:1.8 Branch: 1.8.x s:resolved Status: Resolved. Solution implemented or scheduled t:bug Type: Bug. An issue causing error / flaw / malfunction
Milestone

Comments

@Stefan-MyBB
Copy link
Contributor

Stefan-MyBB commented Jul 31, 2023

  • Warning Undefined array key "thumbnail" - Line: 89 - File: attachment.php PHP 8.2.8 (Linux)
  • Warning Undefined array key "dateline" - Line: 1000 - File: inc/functions_post.php PHP 8.2.8 (Linux)
  • Warning Undefined array key 10 - Line: 1094 - File: forumdisplay.php PHP 8.2.8 (Linux)
  • Warning Trying to access array offset on value of type null - Line: 134 - File: archive/global.php PHP 8.2.8 (Linux) [same issue in lines 116 and 125]
  • Warning Trying to access array offset on value of type bool - Line: 83 - File: archive/index.php PHP 8.2.8 (Linux)
  • Warning Trying to access array offset on value of type bool - Line: 603 - File: inc/class_session.php PHP 8.2.8 (Linux)
  • Warning Undefined array key 1 - Line: 36 - File: inc/functions_online.php PHP 8.2.8 (Linux)
  • Warning Trying to access array offset on value of type null - Line: 194 - File: inc/class_datacache.php PHP 8.2.8 (Linux)
  • Warning Undefined array key "" - Line: 1015 - File: private.php PHP 8.2.8 (Linux)
  • Warning Trying to access array offset on value of type null - Line: 367 - File: showthread.php PHP 8.2.8 (Linux)
  • Warning Trying to access array offset on value of type bool - Line: 73 - File: attachment.php PHP 8.2.8 (Linux)
  • Warning Trying to access array offset on value of type bool - Line: 75 - File: attachment.php PHP 8.2.8 (Linux)
  • Warning Array to string conversion : eval()'d code:48 - Line: 1519 - File: newreply.php PHP 8.2.8 (Linux)
  • Warning Undefined variable $awaysection : eval()'d code:88 - Line: 756 - File: usercp.php PHP 8.2.8 (Linux)
  • Warning Undefined variable $thumblist - Line: 1033 - File: inc/functions_post.php PHP 8.2.8 (Linux)
  • Warning Trying to access array offset on value of type null - Line: 337 - File: showthread.php PHP 8.2.8 (Linux)
  • Warning Undefined variable $words - Line: 7102 - File: inc/functions.php PHP 8.2.8 (Linux)
  • Warning Undefined variable $tcount - Line: 717- File: portal.php PHP 8.2.8 (Linux)
  • Warning Undefined variable $referral_bit : eval()'d code:14 - Line: 531 - File: memberlist.php PHP 8.2.8 (Linux)
  • Warning Undefined variable $referral_header : eval()'d code:50 - Line: 548 - File: memberlist.php PHP 8.2.8 (Linux)
  • Warning Trying to access array offset on value of type null - Line: 3272 - File: inc/functions.php PHP 8.2.8 (Linux)
  • Warning Undefined array key "activity" - Line: 355 - File: inc/functions_online.php PHP 8.2.8 (Linux)
  • Warning Trying to access array offset on value of type null - Line: 273 - File: showthread.php PHP 8.2.8 (Linux)
  • Warning Trying to access array offset on value of type null - Line: 1459 - File: member.php PHP 8.2.8 (Linux)
  • Warning Trying to access array offset on value of type null - Line: 1280 - File: member.php PHP 8.2.8 (Linux)
Stefan-MyBB added a commit to Stefan-MyBB/mybb that referenced this issue Aug 29, 2023
Stefan-MyBB added a commit to Stefan-MyBB/mybb that referenced this issue Aug 29, 2023
Stefan-MyBB added a commit to Stefan-MyBB/mybb that referenced this issue Aug 29, 2023
@dvz dvz added this to the 1.8.37 milestone Aug 30, 2023
@dvz dvz added t:bug Type: Bug. An issue causing error / flaw / malfunction s:confirmed Status: Confirmed. Retested and found the issue exists b:1.8 Branch: 1.8.x labels Aug 30, 2023
Stefan-MyBB added a commit to Stefan-MyBB/mybb that referenced this issue Sep 6, 2023
@spikyatlinux
Copy link

spikyatlinux commented Sep 15, 2023

If board is deactivated you get the following warning under PHP 8.2

Warning [2] Undefined array key "index.php" - Line: 1105 - File: global.php PHP 8.1.20 (Linux)

The complete warning is

/inc/class_error.php 	153 	errorHandler->error
/global.php 	1105 	errorHandler->error_callback
/index.php 	18 	require_once

@Stefan-MyBB
Copy link
Contributor Author

@spikyatlinux You are neither using PHP 8.2 nor reporting a valid issue. Line 1105 in global.php looks like this:

 if(

@spikyatlinux
Copy link

spikyatlinux commented Sep 15, 2023

@spikyatlinux You are neither using PHP 8.2 nor reporting a valid issue. Line 1105 in global.php looks like this:

 if(

I'm sorry but under PHP 7.4 there wasn't an error like this.
I've got the same error on my other system with PHP 8.2.
Best regards

Warning [2] Undefined array key "index.php" - Line: 1105 - File: global.php PHP 8.2.10 (Linux)
File 	Line 	Function
/inc/class_error.php 	153 	errorHandler->error
/global.php 	1105 	errorHandler->error_callback
/index.php 	18 	require_once

@Stefan-MyBB
Copy link
Contributor Author

@spikyatlinux It seems this issue you are reporting is already fixed since MyBB 1.8.31: f98cfd9#diff-7b7d4d5231d83ea738098e31c83ba44004c829ccf7c74ac947ab02b054fe39ceL1105

@spikyatlinux
Copy link

@Stefan-MyBB that's strange I´m running latest 1.8.36 version, I´ve manually merged the changes, now the error has gone. Thanks for helping.

@dvz dvz closed this as completed in #4739 Oct 4, 2023
dvz pushed a commit that referenced this issue Oct 4, 2023
* Fixes #4737 More PHP 8.2 warnings

* Fixes #4737 More PHP 8.2 warnings

* Fixes #4737 More PHP 8.2 warnings

* Minor corrections

* Fixes #4737 More PHP 8.2 warnings

* Minor corrections

* Minor corrections
@dvz dvz added s:resolved Status: Resolved. Solution implemented or scheduled and removed s:confirmed Status: Confirmed. Retested and found the issue exists labels Oct 29, 2023
dvz pushed a commit that referenced this issue Nov 6, 2023
* Fixes #4737 More PHP 8.2 warnings

* Fixes #4737 More PHP 8.2 warnings

* Fixes #4737 More PHP 8.2 warnings

* Minor corrections

* Fixes #4737 More PHP 8.2 warnings

* Minor corrections

* Minor corrections
# Conflicts:
#	admin/modules/user/banning.php
#	archive/global.php
#	archive/index.php
#	forumdisplay.php
#	inc/class_datacache.php
#	inc/functions_post.php
#	install/upgrade.php
#	member.php
#	modcp.php
#	newreply.php
#	portal.php
#	stats.php
#	usercp.php
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
b:1.8 Branch: 1.8.x s:resolved Status: Resolved. Solution implemented or scheduled t:bug Type: Bug. An issue causing error / flaw / malfunction
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants