LLMS_Session::session_has_data()

Determine whether the session contains any non-empty data.


Description Description

Used by set() to decide whether a brand-new session should emit its deferred cookie. An empty array written by llms_clear_notices() should not trigger cookie emission or a database insert.


Top ↑

Return Return

(boolean)


Top ↑

Source Source

File: includes/class.llms.session.php

	protected function session_has_data() {

		foreach ( $this->data as $v ) {
			$uv = maybe_unserialize( $v );
			if ( is_array( $uv ) ? ! empty( $uv ) : ( null !== $uv && false !== $uv && '' !== $uv ) ) {
				return true;
			}
		}

		return false;
	}


Top ↑

Changelog Changelog

Changelog
Version Description
10.0.7 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.