Skip to content

Conversation

@sylae
Copy link
Contributor

@sylae sylae commented Jun 11, 2023

if there's no results it throws a conniption because false is not a model

switched returning false to returning null because that's easier to do as a return type, which should also work fine with all the openplanet cases i've seen this be relevant to (for example PluginAdminController::actionNewVersion())

Comment on lines +153 to +157
return null;
}
$row = $res->fetch_assoc();
if(!$row) {
return false;
return null;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Returning null instead of false is a really big breaking change! I'd prefer if we can still keep returning false here, to make sure existing checks don't break (for example, === false and !== false)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants