Closed (fixed)
Project:
Adminimal - Responsive Administration Theme
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Issue tags:
Reporter:
Created:
9 Mar 2018 at 07:39 UTC
Updated:
4 Feb 2019 at 03:34 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
tessa bakkerComment #3
heyyo commentedProposed patch for it.
Comment #4
heyyo commentedComment #5
maximpodorov commentedOne space is added, and the patch is renamed.
Comment #6
vandna b commentedI have tested it #5 working fine
Comment #7
rob c commentedYup, #5 seems to do the trick.
RTBC: we might find something else > followup. (we need to move on PHP7)
Task: PHP7 ain't a bug.
Comment #8
mookum commentedcount((array)$array)..
Comment #9
hgoto commentedThe patch in #5 works!
I found the same problem was fixed in the core with the patch #2885610-19: [PHP 7.2] Avoid count() calls on uncountable variables . Maybe it's better to have the same change with the core and I adjusted the patch #5 a little. (Sorry to move back to Needs review.)
Comment #10
herved commented+1 It looks good to me. Thanks.
Comment #11
paulvandenburg commentedRegarding #9, on this part of the interdiff:
Why would you use count() instead of !empty() when the only thing we want to know is if it is not empty.
While the count works it seems like the wrong tool for the job.
The empty function could be more performant and/or better optimized. Although I don't know the current benchmarks regarding count() vs empty().
Comment #12
hgoto commented@paulvandenburg:
Because the core uses
count()in the same line intheme_table()and the performance is not the main interest here, I thought.I understand your point. I also think
empty()is better if this part is not related to the core code and this line is called many times in a request. In my opinion, using the same logic with the core as much as possible is more important here for future maintenance though I don't stick tocount(). What do you think?Comment #13
joseph.olstaddisclaimer: without looking at the code - patch #9 seems to work for me
Comment #14
joseph.olstadhad a closer look, RTBC
Comment #15
sjerdoPatch #9 LGTM +1
Comment #16
martin_klimaTested. +1 RTBC
Comment #17
klausiComment #18
joseph.olstadI've sent a message to the maintainer, if he doesn't respond in 2 weeks, make an official request to take ownership of this project.
Comment #19
andrey.troeglazov commentedComment #20
joseph.olstadThanks Andrey!
Comment #21
wylbur commentedJust adding another confirmation that the patch in #9 resolved the PHP errors in php 7.2.
Looking forward to this patch making it to new release!
Comment #23
andrey.troeglazov commentedComment #24
joseph.olstadThanks Andrey!
Comment #25
andrey.troeglazov commented:)