Merge pull request #23894 from altairis-benjamin/isArray

FIX bad check on if in get_all_ways
This commit is contained in:
Laurent Destailleur 2023-02-13 18:10:11 +01:00 committed by GitHub
commit b8aad7d760
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -11,6 +11,7 @@
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr> * Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
* Copyright (C) 2016 Charlie Benke <charlie@patas-monkey.com> * Copyright (C) 2016 Charlie Benke <charlie@patas-monkey.com>
* Copyright (C) 2018-2022 Frédéric France <frederic.france@netlogic.fr> * Copyright (C) 2018-2022 Frédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2023 Benjamin Falière <benjamin.faliere@altairis.fr>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -1463,7 +1464,7 @@ class Categorie extends CommonObject
$ways = array(); $ways = array();
$parents = $this->get_meres(); $parents = $this->get_meres();
if (!empty($parents)) { if (is_array($parents)) {
foreach ($parents as $parent) { foreach ($parents as $parent) {
$allways = $parent->get_all_ways(); $allways = $parent->get_all_ways();
foreach ($allways as $way) { foreach ($allways as $way) {