Bug ParseError: syntax error, unexpected '|', expecting ';' or '{'

Status
Not open for further replies.

Bumblebee

Customer
PHP 8.3.8
  • ParseError: syntax error, unexpected '|', expecting ';' or '{'
  • src/addons/DBTech/Credits/EventTrigger/AbstractHandler.php:112
  • Generated by: Unknown account
  • Nov 22, 2024 at 9:39 PM

Stack trace​

#0 src/vendor/composer/ClassLoader.php(427): Composer\Autoload\{closure}('/var/www/www-sl...')
#1 [internal function]: Composer\Autoload\ClassLoader->loadClass('DBTech\\Credits\\...')
#2 src/addons/DBTech/Credits/EventTrigger/ReadHandler.php(7): spl_autoload_call('DBTech\\Credits\\...')
#3 src/vendor/composer/ClassLoader.php(576): include('/var/www/www-sl...')
#4 src/vendor/composer/ClassLoader.php(427): Composer\Autoload\{closure}('/var/www/www-sl...')
#5 [internal function]: Composer\Autoload\ClassLoader->loadClass('DBTech\\Credits\\...')
#6 [internal function]: spl_autoload_call('DBTech\\Credits\\...')
#7 src/addons/DBTech/Credits/Repository/EventTriggerRepository.php(57): class_exists('DBTech\\Credits\\...')
#8 src/addons/DBTech/Credits/XF/Repository/ThreadRepository.php(28): DBTech\Credits\Repository\EventTriggerRepository->getHandler('read')
#9 src/XF/Pub/Controller/ThreadController.php(187): DBTech\Credits\XF\Repository\ThreadRepository->logThreadView(Object(TC\ThreadTitleRenamer\XF\Entity\Thread))
#10 src/XF/Mvc/Dispatcher.php(362): XF\Pub\Controller\ThreadController->actionIndex(Object(XF\Mvc\ParameterBag))
#11 src/XF/Mvc/Dispatcher.php(265): XF\Mvc\Dispatcher->dispatchClass('XF:Thread', 'Index', Object(XF\Mvc\RouteMatch), Object(XFES\XF\Pub\Controller\Thread), NULL)
#12 src/XF/Mvc/Dispatcher.php(121): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(XFES\XF\Pub\Controller\Thread), NULL)
#13 src/XF/Mvc/Dispatcher.php(63): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#14 src/XF/App.php(2826): XF\Mvc\Dispatcher->run()
#15 src/XF.php(806): XF\App->run()
#16 index.php(29): XF::runApp('XF\\Pub\\App')
#17 {main}
 
Are you absolutely sure you're running PHP 8.3? If this happened via CLI, it's possible your CLI process runs a different version of PHP.
 
I don't know, as that depends entirely on your server. I recommend contacting your server administrator for assistance with this issue.

The affected line is public function getContent($id): Entity|AbstractCollection|null which is valid as of PHP 8.0, so somewhere something is loading an ancient version of PHP for you and triggering this error message.
 
Hello @Bumblebee,

We hope your ticket regarding DragonByte Credits has been addressed to your satisfaction. This ticket has now been scheduled to be closed.

If your ticket has not been resolved, you can reply to this thread at any point in the next 7 days in order to reopen the ticket, afterwards this thread will be closed.

Please do not reply to this thread if your ticket has been resolved.

Thank you.


- DragonByte Technologies, Ltd.
 
Hello @Bumblebee,

As we have not heard back from you, your ticket regarding DragonByte Credits has now been closed.

If your ticket has not been resolved, please feel free to start a new support ticket and link back to this ticket.

If you have time, please leave a review on XenForo.com's Resource Manager.

Thank you.


- DragonByte Technologies, Ltd.
 
Status
Not open for further replies.

DragonByte Credits

XenForo 1.5.3+ XenForo 2.0.x XenForo 2.1.x XenForo 2.2.x XenForo 2.3.x
Seller
DragonByte Technologies
Release date
Last update
Total downloads
4,728
Customer rating
5.00 star(s) 5 ratings
Back
Top