Skip to content

Commit 77dab22

Browse files
authored
Merge pull request #947 from graphpaperpress/cm/wpsessionfix
Cm/wpsessionfix
2 parents 093e671 + 7caa6e3 commit 77dab22

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

inc/class-session.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ public function __construct() {
3131
define( 'WP_SESSION_COOKIE', 'sell_media_session' );
3232
}
3333

34-
if ( ! class_exists( 'Recursive_ArrayAccess' ) && phpversion() < 8) {
35-
include sprintf( '%s/inc/libraries/wp-session/class-recursive-arrayaccess-7.php', plugin_dir_path( dirname( __FILE__ ) ) );
36-
} elseif ( ! class_exists( 'Recursive_ArrayAccess' ) && phpversion() > 8) {
34+
if ( ! class_exists( 'Recursive_ArrayAccess' ) && (defined('PHP_MAJOR_VERSION') && PHP_MAJOR_VERSION >= 8)) {
35+
include sprintf( '%s/inc/libraries/wp-session/class-recursive-arrayaccess.php', plugin_dir_path( dirname( __FILE__ ) ) );
36+
} elseif ( ! class_exists( 'Recursive_ArrayAccess' ) && (defined('PHP_MAJOR_VERSION') && PHP_MAJOR_VERSION < 8)) {
3737
include sprintf( '%s/inc/libraries/wp-session/class-recursive-arrayaccess-7.php', plugin_dir_path( dirname( __FILE__ ) ) );
3838
}
3939

0 commit comments

Comments
 (0)