diff --git a/wire/core/Functions.php b/wire/core/Functions.php index 972260de..f6cd7574 100644 --- a/wire/core/Functions.php +++ b/wire/core/Functions.php @@ -811,6 +811,7 @@ function wireClassName($className, $withNamespace = false, $verbose = false) { $object = null; } + $className = (string) $className; $pos = strrpos($className, $bs); if($withNamespace === true) { diff --git a/wire/core/Password.php b/wire/core/Password.php index 5d999d0f..abf24823 100644 --- a/wire/core/Password.php +++ b/wire/core/Password.php @@ -246,7 +246,7 @@ class Password extends Wire { } else { // older style, non-blowfish support // split the password in two - $splitPass = str_split($pass, (strlen($pass) / 2) + 1); + $splitPass = str_split($pass, (int) (strlen($pass) / 2) + 1); // generate the hash $hash = hash($hashType, $salt1 . $splitPass[0] . $salt2 . $splitPass[1], false); } diff --git a/wire/modules/Fieldtype/FieldtypeRepeater/InputfieldRepeater.module b/wire/modules/Fieldtype/FieldtypeRepeater/InputfieldRepeater.module index 0d6fef84..6c504eac 100644 --- a/wire/modules/Fieldtype/FieldtypeRepeater/InputfieldRepeater.module +++ b/wire/modules/Fieldtype/FieldtypeRepeater/InputfieldRepeater.module @@ -716,7 +716,7 @@ class InputfieldRepeater extends Inputfield implements InputfieldItemList { $addLabel = $this->field->get("repeaterAddLabel$language"); } } - if(!strlen($addLabel)) $addLabel = $this->_('Add New'); + if(!strlen("$addLabel")) $addLabel = $this->_('Add New'); return $addLabel; } diff --git a/wire/modules/PagePermissions.module b/wire/modules/PagePermissions.module index e9aeb058..3363224c 100644 --- a/wire/modules/PagePermissions.module +++ b/wire/modules/PagePermissions.module @@ -860,7 +860,7 @@ class PagePermissions extends WireData implements Module { $_ADDABLE = false; // if we really mean it (as in, do not perform secondary checks) $superuser = $user->isSuperuser(); - if($page->template->noChildren) { + if($page->template && $page->template->noChildren) { $addable = false; } else if($superuser) { diff --git a/wire/modules/Process/ProcessPageLister/ListerBookmarks.php b/wire/modules/Process/ProcessPageLister/ListerBookmarks.php index 9f4f0c22..586d6f4c 100644 --- a/wire/modules/Process/ProcessPageLister/ListerBookmarks.php +++ b/wire/modules/Process/ProcessPageLister/ListerBookmarks.php @@ -600,6 +600,7 @@ class ListerBookmarks extends Wire { $bookmarkID = $bookmark['id']; } else { $type = self::typePublic; + $bookmarkID = (string) $bookmarkID; $ownedPrefix = $this->typePrefix(self::typeOwned); if(strpos($bookmarkID, $ownedPrefix) !== false) { list($userID, $bookmarkID) = explode($ownedPrefix, $bookmarkID);