Skip to content

Commit 5dafabd

Browse files
author
epriestley
committedOct 17, 2019
Fix deprecated argument order for "implode()"
Summary: Fixes T13428. In modern PHP, "implode()" should take the glue parameter first. Test Plan: Used the linter introduced in D20857 to identify affected callsites. ``` $ git grep -i implode | cut -d: -f1 | sort | uniq | xargs arc lint --output summary --never-apply-patches | grep -i glue ``` Maniphest Tasks: T13428 Differential Revision: https://secure.phabricator.com/D20858
1 parent 7badec2 commit 5dafabd

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed
 

‎src/applications/differential/lipsum/PhabricatorDifferentialRevisionTestDataGenerator.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ public function randomlyModify($code, $altcode) {
103103
$newcode2[] = $altcodearr[$randomlines_new[$c++]];
104104
}
105105
}
106-
return implode($newcode2, "\n");
106+
return implode("\n", $newcode2);
107107
}
108108

109109
}

‎src/applications/people/view/PhabricatorUserCardView.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ protected function getTagAttributes() {
3838
}
3939

4040
return array(
41-
'class' => implode($classes, ' '),
41+
'class' => implode(' ', $classes),
4242
);
4343
}
4444

‎src/applications/project/view/PhabricatorProjectCardView.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ protected function getTagAttributes() {
3636
$classes[] = 'project-card-'.$color;
3737

3838
return array(
39-
'class' => implode($classes, ' '),
39+
'class' => implode(' ', $classes),
4040
);
4141
}
4242

‎src/view/phui/PHUIPropertyListView.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ private function renderTextPart(array $part) {
284284
return phutil_tag(
285285
'div',
286286
array(
287-
'class' => implode($classes, ' '),
287+
'class' => implode(' ', $classes),
288288
),
289289
$part['content']);
290290
}
@@ -295,7 +295,7 @@ private function renderRawPart(array $part) {
295295
return phutil_tag(
296296
'div',
297297
array(
298-
'class' => implode($classes, ' '),
298+
'class' => implode(' ', $classes),
299299
),
300300
$part['content']);
301301
}

‎src/view/phui/PHUITwoColumnView.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ private function buildSideColumn() {
220220
return phutil_tag(
221221
'div',
222222
array(
223-
'class' => implode($classes, ' '),
223+
'class' => implode(' ', $classes),
224224
),
225225
array(
226226
$navigation,

0 commit comments

Comments
 (0)
Failed to load comments.