Skip to content

Fix PHP 8.3 TypeError on non-existent pages#17

Open
frandallfarmer wants to merge 1 commit intossahara:masterfrom
frandallfarmer:php83-compatibility-fix
Open

Fix PHP 8.3 TypeError on non-existent pages#17
frandallfarmer wants to merge 1 commit intossahara:masterfrom
frandallfarmer:php83-compatibility-fix

Conversation

@frandallfarmer
Copy link
Copy Markdown

  • Add page existence checks to prevent processing missing pages
  • Fixes 'Cannot access offset of type string on string' error
  • Prevents unnecessary TOC processing on pages that don't exist
  • Maintains existing functionality for valid pages

Affected functions:

  • handlePostProcess()
  • handleTocRender()
  • handleContentDisplay()

Tested on PHP 8.3 - missing pages now show normal DokuWiki message

- Add page existence checks to prevent processing missing pages
- Fixes 'Cannot access offset of type string on string' error
- Prevents unnecessary TOC processing on pages that don't exist
- Maintains existing functionality for valid pages

Affected functions:
- handlePostProcess()
- handleTocRender()
- handleContentDisplay()

Tested on PHP 8.3 - missing pages now show normal DokuWiki message
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant