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
Allow null as offset in select() with strict types
When PHP strict types mode is enabled (`declare(strict_types=1);`) the
`offset` parameter passed as `null` to select() method does not pass
validation. It looks quite natural to accept `null` here, because when
the parameter is omitted the default value (zero) is assumed. A user may
want to set the next parameter (`iterator`) and left `offset` to be
default, so (s)he'll use `null`.
The similar change was made for the `limit` in the scope of #58. After
this commit `offset` and `limit` parameters behave in the same way.
The functionality is already covered by the test suite
(DMLTest::test_14_select_limit_defaults()), but the problem was not
catched until now, because strict types mode is not enabled in tests.
It'll be enabled in a following commit and the problem will be actually
tested.
Fixes#154.
0 commit comments