Skip to content
This repository has been archived by the owner on Jun 22, 2022. It is now read-only.

Incompatible with Silverstripe 3.7 #11

Open
cuteUnicornCode opened this issue Oct 22, 2020 · 1 comment
Open

Incompatible with Silverstripe 3.7 #11

cuteUnicornCode opened this issue Oct 22, 2020 · 1 comment

Comments

@cuteUnicornCode
Copy link

Due to PHP 7.2 SilverStripe 3.7 changed the name of the class "Object" to "SS_Object".
This causing fatal error and the addon breaks the site.

( ! ) Fatal error: Cannot use 'Object' as class name as it is reserved in /var/www/html/framework/core/compat/Object.php on line 3
--
# | Time    | Memory| Function | Location
1 | 0.0012 | 438336 | {main}(  ) | .../main.php:0
2 | 0.0062 | 513416 | ErrorControlChain->execute(  ) | .../main.php:171
3 | 0.0062 | 514200 | ErrorControlChain->step(  ) | .../ErrorControlChain.php:206
4 | 0.0062 | 514224 | {closure:/var/www/html/framework/main.php:134-164}(  ) | .../ErrorControlChain.php:215
5 | 0.0073 | 554824 | require_once( '/var/www/html/framework/core/Core.php' ) | .../main.php:139
6 | 0.0641 | 3457424 | Config->pushConfigYamlManifest(  ) | .../Core.php:129
7 | 0.0642 | 3453064 | SS_ConfigManifest->activateConfig(  ) | .../Config.php:324
8 | 0.0894 | 6467232 | require_once( '/var/www/html/silverstripe-frontend-admin/_config.php' ) | .../ConfigManifest.php:144
9 | 0.0894 | 6467320 | spl_autoload_call (  ) | .../_config.php:5
10 | 0.0894 | 6467352 | SS_ClassLoader->loadClass(  ) | .../_config.php:5

https://docs.silverstripe.org/en/3/changelogs/3.7.0/#silverstripe-3-7-and-php-7-2-and-object-subclasses
SilverStripe 3.7 now supports PHP 7.2, which is exciting, but PHP 7.2 introduces an object keyword. To use it, you can replace any uses of Object with SS_Object in your own project code.

@cuteUnicornCode
Copy link
Author

#12 I fixed the issue by replace Object with SS_Object in files using Object class.

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

No branches or pull requests

1 participant