diff options
author | Malf Furious <m@lfurio.us> | 2018-09-19 16:39:31 -0400 |
---|---|---|
committer | Malf Furious <m@lfurio.us> | 2018-09-19 16:44:15 -0400 |
commit | eef89807b15b0e38362d67b68a5becacc8838864 (patch) | |
tree | 85f568b417427ce004af54b56cfb6650dfc5073e /app/class/globals.php | |
parent | 5a086d1592c43b8259f988e9e7f6f167318252ef (diff) | |
download | scrott-eef89807b15b0e38362d67b68a5becacc8838864.tar.gz scrott-eef89807b15b0e38362d67b68a5becacc8838864.zip |
globals: Remove single call assertions for setPage...() functions
Removing these unnecessary checks. They are not protecting us from
anything, only inconveniencing me in index.php.
Diffstat (limited to 'app/class/globals.php')
-rw-r--r-- | app/class/globals.php | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/app/class/globals.php b/app/class/globals.php index 6e3b7fd..c1a6e32 100644 --- a/app/class/globals.php +++ b/app/class/globals.php @@ -146,16 +146,11 @@ function getErrors(string $level) : array } /* - * Set the page object for the current request. This can only - * be called once per runtime. + * Set the page object for the current request. */ function setPageObj(obj $obj) : void { global $_SCROTT; - - if ($_SCROTT['PAGE_OBJECT'] !== NULL) - throw new Exception("Tried to establish page object context twice"); - $_SCROTT['PAGE_OBJECT'] = $obj; } @@ -169,16 +164,11 @@ function getPageObj() : ?obj } /* - * Set the page name string. This can only be called once per - * runtime. + * Set the page name string. */ function setPageName(string $name) : void { global $_SCROTT; - - if ($_SCROTT['PAGE_NAME'] !== "") - throw new Exception("Tried to configure page name twice"); - $_SCROTT['PAGE_NAME'] = $name; } |