You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Howdy friends. The CLI will create a theme that has a name starting with a number even though it directly uses that value as a class name. Enabling the theme dumps the whole instance with a parse error.
<?phpnamespaceGrav\Theme;
useGrav\Common\Theme;
class2numeric4gravextendsTheme
{
// Access plugin events in this class
}
Arguments"syntax error, unexpected integer "2", expecting identifier"
I imagine this is pretty low priority, but also seems like a trivial addition to your existing validation check... but I only skimmed it!
(If anyone lands here investigating how to restore your crashed instance after enabling a theme with an illegal name, just go into the grav's system.yaml and swap out any references to the bad theme name with another valid theme and you'll be good to go.)
The text was updated successfully, but these errors were encountered:
ChefAndy
changed the title
Allows creating theme with illegal class name. Enabling theme crashes whole app.
Allows creating theme with illegal class name. Enabling theme crashes whole instance.
Apr 10, 2023
Howdy friends. The CLI will create a theme that has a name starting with a number even though it directly uses that value as a class name. Enabling the theme dumps the whole instance with a parse error.
I imagine this is pretty low priority, but also seems like a trivial addition to your existing validation check... but I only skimmed it!
(If anyone lands here investigating how to restore your crashed instance after enabling a theme with an illegal name, just go into the grav's
system.yaml
and swap out any references to the bad theme name with another valid theme and you'll be good to go.)The text was updated successfully, but these errors were encountered: