2 Commits
1.0.6 ... 1.0.8

Author SHA1 Message Date
ef4818356c Pagination bugfix 2024-08-13 02:35:11 -04:00
85ed1def88 session bugfixes 2024-08-13 02:25:11 -04:00
2 changed files with 8 additions and 1 deletions

View File

@ -17,6 +17,7 @@ use TheTempusProject\Bedrock\Functions\Input;
use TheTempusProject\Bedrock\Classes\Config;
use TheTempusProject\Bedrock\Functions\Check;
use TheTempusProject\Canary\Bin\Canary as Debug;
use TheTempusProject\Houdini\Classes\Components;
class Pagination extends Template {
//The settings that will not change

View File

@ -21,6 +21,9 @@ class Session {
* @return {bool}
*/
public static function exists( $name ) {
if (session_status() === PHP_SESSION_NONE) {
session_start();
}
if ( ! Check::sessionName( $name ) ) {
return false;
}
@ -43,7 +46,7 @@ class Session {
return false;
}
$sessionName = DEFAULT_SESSION_PREFIX . $name;
if ( self::exists( $sessionName ) ) {
if ( self::exists( $name ) ) {
return $_SESSION[ $sessionName ];
}
Debug::info( "Session::get - Session not found: $sessionName" );
@ -58,6 +61,9 @@ class Session {
* @return {bool}
*/
public static function put( $name, $data ) {
if (session_status() === PHP_SESSION_NONE) {
session_start();
}
if ( ! Check::sessionName( $name ) ) {
return false;
}