-
Notifications
You must be signed in to change notification settings - Fork 15
PHP7 Declaration Warning #16
Comments
Collection.php public function addItem($itemObj, $id = 0, $overwrite = false) {
// add item if item type is validated
if ($this->checkItemType($itemObj) == true) {
if ($id === 0) {
$this->itemsArr[] = $itemObj;
} else {
$this->itemsArr[$id] = $itemObj;
}
} else {
// throw exception if item type is not validated
throw new Tx_PtExtbase_Exception_Internal('Item to add to collection is of wrong type (' . get_class($itemObj) . '). 1316764449' );
}
} Registry.php public function addItem($itemObj, $id = 0, $overwrite = false ) {
Tx_PtExtbase_Assertions_Assert::isNotEmpty($id, array('message' => 'Registry keys cannot be empty!'));
if (!$this->hasItem($id) || $overwrite == true) {
// add object to the collection
parent::addItem($itemObj, $id);
} else {
throw new Exception('There is already an element stored with the label "'.$id.'" (and overwriting not permitted)!');
}
} Helps, but I don't know if this is all |
It would be great if this bug could be fixed. |
Came across this issue today too. Running PHP 7.0.21. |
For the time being I attached a patch which can be used through composer. I use the package cweagans/composer-patches to apply the patches automatically during composer updates/installs. composer.json should look like this: |
Hi,
since update to PHP7 pt_extbase does not work anymore:
Could you please check this?
The text was updated successfully, but these errors were encountered: