From eef89807b15b0e38362d67b68a5becacc8838864 Mon Sep 17 00:00:00 2001 From: Malf Furious Date: Wed, 19 Sep 2018 16:39:31 -0400 Subject: 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. --- app/class/globals.php | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'app') 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; } -- cgit v1.2.3