Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/guest.cls.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public function update_guest_vary() {

// Send vary cookie
$vary = 'guest_mode:1';
if ( $this->_conf && empty( $this->_conf[ self::O_DEBUG ] ) ) {
if ( $this->_conf && empty( $this->_conf[ self::O_DEBUG ] ) && isset( $this->_conf[ self::HASH ] ) ) {
$vary = md5( $this->_conf[ self::HASH ] . $vary );
}

Expand Down Expand Up @@ -123,7 +123,7 @@ public function always_guest() {
return false;
}

if ( $this->_conf[ self::O_GUEST_UAS ] ) {
if ( isset( $this->_conf[ self::O_GUEST_UAS ] ) && $this->_conf[ self::O_GUEST_UAS ] ) {
$quoted_uas = array();
foreach ( $this->_conf[ self::O_GUEST_UAS ] as $v ) {
$quoted_uas[] = preg_quote( $v, '#' );
Expand All @@ -134,7 +134,7 @@ public function always_guest() {
}
}

if ( $this->ip_access( $this->_conf[ self::O_GUEST_IPS ] ) ) {
if ( isset( $this->_conf[ self::O_GUEST_IPS ] ) && $this->ip_access( $this->_conf[ self::O_GUEST_IPS ] ) ) {
return true;
}

Expand Down