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

[3.0]: Value passed to method even when it isn't set #8391

Closed
Oldiesmann opened this issue Jan 2, 2025 · 1 comment
Closed

[3.0]: Value passed to method even when it isn't set #8391

Oldiesmann opened this issue Jan 2, 2025 · 1 comment

Comments

@Oldiesmann
Copy link
Contributor

Basic Information

Updated my SMF 3 Postgres test board today (for the first time in 6 months apparently) and got a white screen as soon as I went to the board index after running upgrade.php.

Steps to reproduce

  1. Attempt to access board index, apparently on a forum running Postgres

Expected result

Forum loads properly

Actual result

White screen

Version/Git revision

3.0 Alpha 2

Database Engine

PostgreSQL

Database Version

14.15 (Ubuntu 14.15-0ubuntu0.22.04.1)

PHP Version

8.3.14

Logs

PHP Fatal error: Uncaught TypeError: SMF\\Parser::transform(): Argument #1 ($string) must be of type string, null given, called in /.../Sources/Board.php on line 882 and defined in /.../Sources/Parser.php:279
Stack trace:
#0 /.../Sources/Board.php(882): SMF\\Parser::transform()
#1 /.../Sources/Actions/BoardIndex.php(432): SMF\\Board->parseDescription()
#2 /.../Sources/Actions/BoardIndex.php(63): SMF\\Actions\\BoardIndex::get()
#3 /../Sources/ActionTrait.php(55): SMF\\Actions\\BoardIndex->execute()
#4 [internal function]: SMF\\Actions\\BoardIndex::call()
#5 /.../Sources/Forum.php(263): call_user_func()
#6 /.../index.php(149): SMF\\Forum->ex..

Forum error log also shows "Undefined array key: 1" on line 883 of Board.php

Additional Information

We're trying to pass the value of self::$parsed_descriptions[$this->id] to the Parser::transform() method to set self::$parsed_descriptions[$this->id] even when we've already determined that this value isn't set, which of course causes the error. This needs to be fixed of course, but we also need to figure out why this value isn't set in this case, as the board does have a description.

@Oldiesmann
Copy link
Contributor Author

Just double-checked and my PG test board was a few weeks behind github. After syncing things up again, it's working fine now, so I'll close this. If the issue pops up again I'll reopen this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant