Skip to content

Instantly share code, notes, and snippets.

@ano
Created May 1, 2023 00:11
Show Gist options
  • Save ano/47728f20c9ecc033de1398a8fe60410b to your computer and use it in GitHub Desktop.
Save ano/47728f20c9ecc033de1398a8fe60410b to your computer and use it in GitHub Desktop.
PHPMaker fix for PHP version 8

Convert the following to ternary:

Find

$GLOBALS["Title"] ??= $page->Title; // Title

and replace

$GLOBALS["Title"] = $GLOBALS["Title"] ?: $page->Title;

Find

$GLOBALS["Conn"] ??= $this->getConnection();

and replace

$GLOBALS["Conn"] = $GLOBALS["Conn"] ?: $this->getConnection();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment