Start session if it hasn't been started yet

Uses session_status() to check status before starting new session. Read more.

php
fork add to bundle source
function session_start_once() { if (session_status() == PHP_SESSION_NONE) { session_start(); } }

usage

load_function('session_start_once'); session_start_once(); // Will start session if it hasn't been started yet
← how to use this in app?
create log ...inout