aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Lange <code@nerdmind.de>2021-10-02 12:58:57 +0200
committerThomas Lange <code@nerdmind.de>2021-10-02 13:09:00 +0200
commit4b0b1c405c5dd242fdef37930502dd4341222c3d (patch)
tree7fa23f3961213a9bbe21ceb3e6c1de11fbbc5c26
parent17111a22ef698c97f1c447e7314c4f7327105301 (diff)
downloadblog-4b0b1c405c5dd242fdef37930502dd4341222c3d.tar.gz
blog-4b0b1c405c5dd242fdef37930502dd4341222c3d.tar.xz
blog-4b0b1c405c5dd242fdef37930502dd4341222c3d.zip
Don't use suppression operator for "session_start"
Don't use the suppression operator "@" for the "session_start" call in the migrations.php file, but rather check properly if there already is an active session by checking the "session_status" return value.
-rw-r--r--core/migrations.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/migrations.php b/core/migrations.php
index 1ddeefd..52cf31d 100644
--- a/core/migrations.php
+++ b/core/migrations.php
@@ -8,7 +8,9 @@ $Migrator = Application::getMigrator();
# Check for outstanding database schema migrations
#===============================================================================
if($Migrator->isMigrationNeeded()) {
- @session_start();
+ if(session_status() !== PHP_SESSION_ACTIVE) {
+ session_start();
+ }
Application::set('TEMPLATE.NAME', Application::get('ADMIN.TEMPLATE'));
Application::set('TEMPLATE.LANG', Application::get('ADMIN.LANGUAGE'));