@@ -73,9 +73,9 @@ discard block |
||
73 | 73 | $cookie = stripslashes( $_COOKIE[WP_SESSION_COOKIE] ); |
74 | 74 | $cookie_crumbs = explode( '||', $cookie ); |
75 | 75 | |
76 | - $this->session_id = preg_replace("/[^A-Za-z0-9_]/", '', $cookie_crumbs[0] ); |
|
77 | - $this->expires = absint( $cookie_crumbs[1] ); |
|
78 | - $this->exp_variant = absint( $cookie_crumbs[2] ); |
|
76 | + $this->session_id = preg_replace("/[^A-Za-z0-9_]/", '', $cookie_crumbs[0] ); |
|
77 | + $this->expires = absint( $cookie_crumbs[1] ); |
|
78 | + $this->exp_variant = absint( $cookie_crumbs[2] ); |
|
79 | 79 | |
80 | 80 | // Update the session expiration if we're past the variant time |
81 | 81 | if ( time() > $this->exp_variant ) { |
@@ -118,10 +118,10 @@ discard block |
||
118 | 118 | } |
119 | 119 | |
120 | 120 | /** |
121 | - * Set the session cookie |
|
122 | - * @uses apply_filters Calls `wp_session_cookie_secure` to set the $secure parameter of setcookie() |
|
123 | - * @uses apply_filters Calls `wp_session_cookie_httponly` to set the $httponly parameter of setcookie() |
|
124 | - */ |
|
121 | + * Set the session cookie |
|
122 | + * @uses apply_filters Calls `wp_session_cookie_secure` to set the $secure parameter of setcookie() |
|
123 | + * @uses apply_filters Calls `wp_session_cookie_httponly` to set the $httponly parameter of setcookie() |
|
124 | + */ |
|
125 | 125 | protected function set_cookie() { |
126 | 126 | if ( !defined( 'GD_TESTING_MODE' ) ) { |
127 | 127 | try { |
@@ -99,11 +99,11 @@ |
||
99 | 99 | |
100 | 100 | // Delete expired sessions |
101 | 101 | if ( ! empty( $expired ) ) { |
102 | - $placeholders = array_fill( 0, count( $expired ), '%s' ); |
|
103 | - $format = implode( ', ', $placeholders ); |
|
104 | - $query = "DELETE FROM $wpdb->options WHERE option_name IN ($format)"; |
|
102 | + $placeholders = array_fill( 0, count( $expired ), '%s' ); |
|
103 | + $format = implode( ', ', $placeholders ); |
|
104 | + $query = "DELETE FROM $wpdb->options WHERE option_name IN ($format)"; |
|
105 | 105 | |
106 | - $prepared = $wpdb->prepare( $query, $expired ); |
|
106 | + $prepared = $wpdb->prepare( $query, $expired ); |
|
107 | 107 | $wpdb->query( $prepared ); |
108 | 108 | } |
109 | 109 |