Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Type error (due to null versus bool) from patch for #1431 #1435

Closed
manumitted opened this issue Aug 22, 2024 · 3 comments
Closed

Type error (due to null versus bool) from patch for #1431 #1435

manumitted opened this issue Aug 22, 2024 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@manumitted
Copy link

manumitted commented Aug 22, 2024

Describe the bug
I'm not sure if I need to open a new bug, or somehow re-open the other one, but the fix for #1431 appears to be incomplete.

From version 2.14.1, the following log message occurs, and the trash message still exists:

TypeError OCA\Collectives\Model\PageInfo::fromFile(): Argument #7 ($fullWidth) must be of type bool, null given, called in /var/www/nextcloud/apps/collectives/lib/Service/PageService.php on line 233
Collectives App Error: OCA\Collectives\Model\PageInfo::fromFile(): Argument #7 ($fullWidth) must be of type bool, null given, called in /var/www/nextcloud/apps/collectives/lib/Service/PageService.php on line 233

I think the patch kicked the can down the road a bit, but not all the way?

(Thanks for the quick support, by the way. I'm sorry but I don't know PHP very well. I'm more of a C++ guy.)

@manumitted manumitted added the bug Something isn't working label Aug 22, 2024
@manumitted
Copy link
Author

OK, I tried adding "== true" to the patched statement, and the error went away. I think this might be a PHP-ism that works.

$page?->getFullWidth() == true

@mejo-
Copy link
Member

mejo- commented Aug 23, 2024

Thanks a lot, @manumitted. Indeed when $page is null, the former fix is incomplete. I've pushed a follow-up fix to #1439

@mejo- mejo- self-assigned this Aug 23, 2024
@github-project-automation github-project-automation bot moved this to 🧭 Planning evaluation (don't pick) in 📝 Office team Aug 23, 2024
@mejo- mejo- moved this from 🧭 Planning evaluation (don't pick) to 🏗️ In progress in 📝 Office team Aug 23, 2024
@mejo-
Copy link
Member

mejo- commented Aug 23, 2024

Fixed by #1439

@mejo- mejo- closed this as completed Aug 23, 2024
@github-project-automation github-project-automation bot moved this from 🏗️ In progress to ☑️ Done in 📝 Office team Aug 23, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

No branches or pull requests

2 participants