← Back to team overview

mahara-contributors team mailing list archive

[Bug 1812910] A change has been merged

 

Reviewed:  https://reviews.mahara.org/9484
Committed: https://git.mahara.org/mahara/mahara/commit/6689eadf31b9d3540580d590e3c2e39a3f8fa82a
Submitter: Cecilia Vela Gurovic (ceciliavg@xxxxxxxxxxxxxxx)
Branch:    18.04_STABLE

commit 6689eadf31b9d3540580d590e3c2e39a3f8fa82a
Author: Robert Lyon <robertl@xxxxxxxxxxxxxxx>
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 <robertl@xxxxxxxxxxxxxxx>
(cherry picked from commit 9b3e36e25f53f3db81f5d643abdc00eec285d148)

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1812910

Title:
  count(): Parameter must be an array or an object that implements
  Countable in Importer

Status in Mahara:
  Fix Committed
Status in Mahara 18.04 series:
  Fix Committed
Status in Mahara 18.10 series:
  Fix Committed
Status in Mahara 19.04 series:
  Fix Committed

Bug description:
  Importer needs to use is_array() instead of count() in PHP 7.2 when we
  are wanting to check if there is an array to loop over with foreach().

  Currently we try to loop over entries by checking with count() and we
  get error

  - count(): Parameter must be an array or an object that implements
  Countable

  when there is nothing set

To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1812910/+subscriptions


References