From 680de0c6d06c84e84fb68f307f75856e2e13bb1c Mon Sep 17 00:00:00 2001 From: "Bradley W. Dutton" Date: Sat, 1 Feb 2020 20:53:43 -0800 Subject: [PATCH] fix implode() so the separater is always the first argument --- installer/cli.php | 2 +- modules/gallery/controllers/upgrader.php | 2 +- modules/gallery/models/item.php | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/installer/cli.php b/installer/cli.php index b31405f1..9b2663e7 100644 --- a/installer/cli.php +++ b/installer/cli.php @@ -32,7 +32,7 @@ if (installer::already_installed()) { $errors = installer::check_environment(); if ($errors) { - oops(implode($errors, "\n")); + oops(implode("\n", $errors)); } $config = parse_cli_params(); diff --git a/modules/gallery/controllers/upgrader.php b/modules/gallery/controllers/upgrader.php index 6b3a9ef6..d5823a32 100644 --- a/modules/gallery/controllers/upgrader.php +++ b/modules/gallery/controllers/upgrader.php @@ -102,7 +102,7 @@ class Upgrader_Controller extends Controller { if ($failed) { print "Upgrade completed ** WITH FAILURES **\n"; print "The following modules were not successfully upgraded:\n"; - print " " . implode($failed, "\n ") . "\n"; + print " " . implode("\n ", $failed) . "\n"; print "Try getting newer versions or deactivating those modules\n"; } else { print "Upgrade complete\n"; diff --git a/modules/gallery/models/item.php b/modules/gallery/models/item.php index 2dbd99bb..ef5f74a1 100644 --- a/modules/gallery/models/item.php +++ b/modules/gallery/models/item.php @@ -285,8 +285,8 @@ class Item_Model_Core extends ORM_MPTT { $names[] = rawurlencode($row->name); $slugs[] = rawurlencode($row->slug); } - $this->relative_path_cache = implode($names, "/"); - $this->relative_url_cache = implode($slugs, "/"); + $this->relative_path_cache = implode("/", $names); + $this->relative_url_cache = implode("/", $slugs); return $this; }