Bug on install/upgrade: Parse error

Status
Not open for further replies.

Josh Jolly

Customer
When installing/upgrading.

Parse error: syntax error, unexpected 'public' (T_PUBLIC), expecting identifier (T_STRING) in /public_html/library/DBTech/Shop/XenForo/EventListener/ContainerParams.php on line 4
 
There is no syntax error in that file, this will only happen if you refresh the forum while the file is uploading.
 
i went as far as deactivating my site, tried to install and still get the same error.
it simply will not install.
 
You mean this?
Code:
<?php
class DBTech_Shop_XenForo_EventListener_ContainerParams
{
	public static function public(array &$params, XenForo_Dependencies_Abstract $dependencies)
	{
		if (
			file_exists(XenForo_Helper_File::getExternalDataPath() . '/dbtechShopUpgrade.lock')
			AND !XenForo_Application::debugMode()
		)
		{
			return;
		}

		if ($params['selectedTabId'] == 'dbtech-shop')
		{
			$params['selectedTab']['title'] = $params['selectedTab']['_title'];
		}
	}
}
 
Yeah that's the one, I can't find any syntax errors in it. Can you double-check that you're running PHP 5.6 or higher, and that you are not uploading the file in UTF-8 With BOM format?


EDIT: Maybe PHP versions earlier than 7.0 doesn't like function names called "public"?
I have applied a potential hotfix to the files & XML file for the Shop, can you please try re-downloading and re-uploading the files & the XML file and see if this works for you?
 
Last edited:
Hello Josh Jolly,

This ticket has now been closed with the status Fixed.

We hope your issue or question has been addressed to your satisfaction. If not, please feel free to re-open it by clicking this link.

If you have any further issues or questions, please feel free to start a new support ticket via the button at the top of every page.

Thank you!
 
Status
Not open for further replies.

DragonByte Shop

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