Comment 4 for bug 1812910

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/9483
Committed: https://git.mahara.org/mahara/mahara/commit/745e368f1dff6ea7e5de0a1f636bcf1f36ca1cb3
Submitter: Cecilia Vela Gurovic (<email address hidden>)
Branch: 18.10_STABLE

commit 745e368f1dff6ea7e5de0a1f636bcf1f36ca1cb3
Author: Robert Lyon <email address hidden>
Date: Wed Jan 23 09:09:33 2019 +1300

Bug 1812910: Importer needs to use is_array() before count() in PHP 7.2

When we are wanting to check if there is an array to foreach loop over
and that array has at least one entry.

Currently we try to loop over entries by checking with just count() and we get error
- count(): Parameter must be an array or an object that implements Countable

behatnotneeded

Change-Id: I9accca2e97f415d5f9a2203b6fd984a41e95a4d0
Signed-off-by: Robert Lyon <email address hidden>
(cherry picked from commit 9b3e36e25f53f3db81f5d643abdc00eec285d148)