}
// Checks whether the cache instance is valid
-function isCacheInstanceValid () {
+function isValidCacheInstance () {
// Is there cache?
if (!isset($GLOBALS[__FUNCTION__])) {
// Determine it
// Checks if the user data is valid, this may indicate that the user has logged
// in, but you should use isMember() if you want to find that out.
-function isUserDataValid () {
+function isValidUserData () {
// User id should not be zero so abort here
if (!isCurrentUserIdSet()) {
// Debug message, may be noisy
// Wrapper to check if the first element to be shifted is set to given value
function shift_array (&$array, $value, $key = '0') {
// Is the element set and value matches?
- assert(is_array($array));
- assert(isset($array[$key]));
- assert($array[$key] === $value);
+ assert(is_array($array), 'array[]=' . gettype($array), ',expected: array');
+ assert(isset($array[$key]), 'array[' . $key . '] not set.');
+ assert(($array[$key] === $value), ',array[' . $key . ']=' . $array[$key] . ',value=' . $value);
// Shift it
array_shift($array);