Fixed E_NOTICE in listing worker queue and new utilities class added (#5521)
authorRoland Häder <Quix0r@users.noreply.github.com>
Tue, 31 Jul 2018 01:24:26 +0000 (03:24 +0200)
committerHypolite Petovan <mrpetovan@eml.cc>
Tue, 31 Jul 2018 01:24:26 +0000 (21:24 -0400)
commitbf87ad4fcfcb6fd653441ed0fe6a8e99c27a9a3e
treec124ceea606a7f9f9bc6a653f09b3bc8f856b809
parent3da1b9f3196a029708571009ecb820a2dc2aff7d
Fixed E_NOTICE in listing worker queue and new utilities class added (#5521)

* Fixes for E_NOTICE in workqueue:
- introduced class `Friendica\Util\Arrays` which will hold static methods for
  handling arrays that cannot be done with PHP's functions, like implode() on
  multi-dimensional arrays
- rewrote old-school for() loop to foreach()

* Added intial unit test with some tests on empty delimiters and/or sinle and
multi-dim array.

* Added test for for 3-dimensional arrays, thanks to  nupplaphil's feedback.
mod/admin.php
src/Util/Arrays.php [new file with mode: 0644]
tests/src/Util/ArraysTest.php [new file with mode: 0644]