You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
\Nette\Database\Table\SqlBuilder::buildSelectQuery accepts array only or nullable since 14506d0/v2.4.2/v3.0.0-alpha [blame].
It's called internally and gets a value returned e.g. from \Nette\Database\Table\Selection::getPreviousAccessedColumns[link]. And this method returns array (it's OK) but can return bool too (and it's not OK then). See @return annotation of that function.
It seems the annotation is wrong because default (and the one) implementation will return always an array.
I have a problem when I use an overridden \Nette\Database\Table\Selection.
It was OK prior to 14506d0/v2.4.2/v3.0.0-alpha. Since those versions I get Argument 1 passed to Nette\Database\Table\SqlBuilder::buildSelectQuery() must be of the type array, boolean given.
Solution
Fix annotation for v2.x, array return typehint for v3.x in \Nette\Database\Table\Selection::getPreviousAccessedColumns
It should always return an array. As of the default implementation.
The text was updated successfully, but these errors were encountered:
hranicka
added a commit
to hranicka/fork-nette-database
that referenced
this issue
Feb 2, 2017
Description
\Nette\Database\Table\SqlBuilder::buildSelectQuery
accepts array only or nullable since 14506d0/v2.4.2/v3.0.0-alpha [blame].It's called internally and gets a value returned e.g. from
\Nette\Database\Table\Selection::getPreviousAccessedColumns
[link]. And this method returns array (it's OK) but can return bool too (and it's not OK then). See@return
annotation of that function.It seems the annotation is wrong because default (and the one) implementation will return always an array.
I have a problem when I use an overridden
\Nette\Database\Table\Selection
.It was OK prior to 14506d0/v2.4.2/v3.0.0-alpha. Since those versions I get
Argument 1 passed to Nette\Database\Table\SqlBuilder::buildSelectQuery() must be of the type array, boolean given
.Solution
Fix annotation for v2.x, array return typehint for v3.x in
\Nette\Database\Table\Selection::getPreviousAccessedColumns
It should always return an array. As of the default implementation.
The text was updated successfully, but these errors were encountered: