-
Notifications
You must be signed in to change notification settings - Fork 59
-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
XoopsBlock::store() should return int, but it calls XoopsBlockHandler::insert() which returns bool #1105
Comments
We'll have to let @geekwright weigh in but in my opinion Having said that - the 2.5.10 version of the |
@zyspec, you're right that the I found this code that deals with that in an old module Blocksadmin: $newid = $cblock->store();
if (!$newid) {
xoops_cp_header();
$cblock->getHtmlErrors();
xoops_cp_footer();
exit();
} |
It looks like the 'fix' in 2.5.11 public function store()
{
/** @var XoopsBlockHandler $blkhandler */
$blkhandler = xoops_getHandler('block');
$bid = false;
if (true === $blkhandler->insert($this)) {
$bid = $this->getVar('bid');
}
return $bid;
} |
I think, that should work! |
Originally store() returned int, but now, since it calls XoopsBlockHandler::insert(), it returns bool:
This breaks cases like this one:
Should I change all these cases to something like:
The text was updated successfully, but these errors were encountered: