After updating to PHP 7.1 I got several warnings:
Warning: A non-numeric value encountered in function views_plugin_pager_full->query() (line 256 in file .../sites/all/modules/contrib/views/plugins/views_plugin_pager_full.inc).
Warning: A non-numeric value encountered in function views_handler_field_counter->render() (line 58 in file .../sites/all/modules/contrib/views/handlers/views_handler_field_counter.inc).| Comment | File | Size | Author |
|---|---|---|---|
| #13 | 2885660-13.patch | 3 KB | joelpittet |
| #11 | views_plugin_pager_full-query-2885660-11.patch | 764 bytes | steinmb |
| #5 | views-plugin_pager_full-query-2885660-5-D7.patch | 2.12 KB | StefanPr |
| #4 | views_plugin_pager_full-query-2885660-4.patch | 2.08 KB | StefanPr |
| #2 | views_plugin_pager_full-query()-2885660-2.patch | 1.55 KB | plazik |
Comments
Comment #2
plazik commentedThis is because "offset" sometimes is not set.
Comment #4
StefanPr commentedI've added filter_var to another variable that was being used in a sum as a string.
Comment #5
StefanPr commentedAdded patch for 3.18
Comment #6
natanmoraesPatch from #5 works for me on views 3.17
Comment #8
manuel garcia commentedPatch #4 is failing tests.
Comment #9
thebigmacmurray commentedPatch #5 does not work for me on Views 3.20
Comment #10
manuel garcia commentedPatch #4 still applies cleanly on
7.x-3.x.Why hardcode this to
0?Comment #11
steinmb commentedI do not think we can do type hinting. That would req. everyone to use minimum PHP 7.0. https://secure.php.net/manual/en/functions.arguments.php#functions.argum...
Tried on one site generating these warning to step through. Sometime do I get the string "", sometime string 0 and sometime int. 0. Could we do something along these lines to make sure it is a integer before calculate?
Comment #12
joelpittet@steinmb How about just cast it to an (int)?
I don't see how a
floatoffset would be useful.Comment #13
joelpittetHere's my thought in patch form
Comment #14
steinmb commentedNo idea what I was thinking. Must have been mad or tired. I think I got tricked by https://wiki.php.net/rfc/integer_semantics. Sure casting like this will work in older versions PHP.
Comment #15
manuel garcia commented+1 to RTBC #13
Comment #16
nikolabintev commented#13 works for me with PHP 7.1
Comment #17
dsnopekRTBC+1! Used in Panopoly
Comment #18
damienmckennaComment #20
damienmckennaCommitted. Thanks!
Comment #22
joegraduateComment #23
Annelies Van der Wee commented#13 fixed it, Thanks!!
Comment #24
wylbur commentedFYI - the patch in comment #19 still applied cleanly to the 7.x-3.21 version of views.
Comment #25
wylbur commentedFYI - the patch in comment #19 still applied cleanly to the 7.x-3.22 version of views.
We'll be delighted with this reaches the officially stable release of views...
Comment #26
manuel garcia commentedRe #25:
Good to hear that the patch at least applies cleanly to the latest release :)
The good news is that as far as I understand, this will be included inn the upcoming
7.x-3.23release. Please see #2960871: Plan for Views 7.x-3.23 release for plans, what needs to happen first, etc.