Skip to content

Commit 38b5049

Browse files
jrfnlmblaney
authored andcommitted
PHP 7.4 compatibility fix / implode argument order (#617)
`implode()` takes two parameters, `$glue` and `$pieces`. For historical reasons, `implode()` accepted these parameters in either order, though it was recommended to use the documented argument order of `implode( $glue, $pieces )`. PHP 7.4 is slated to deprecate the tolerance for passing the parameters for `implode()` in reverse order. PHP 8.0 is expected to remove the tolerance for this completely. Refs: * https://wiki.php.net/rfc/deprecations_php_7_4#implode_parameter_order_mix * https://php.net/manual/en/function.implode.php
1 parent 11ddaed commit 38b5049

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

library/SimplePie/Parse/Date.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -575,8 +575,8 @@ class SimplePie_Parse_Date
575575
*/
576576
public function __construct()
577577
{
578-
$this->day_pcre = '(' . implode(array_keys($this->day), '|') . ')';
579-
$this->month_pcre = '(' . implode(array_keys($this->month), '|') . ')';
578+
$this->day_pcre = '(' . implode('|', array_keys($this->day)) . ')';
579+
$this->month_pcre = '(' . implode('|', array_keys($this->month)) . ')';
580580

581581
static $cache;
582582
if (!isset($cache[get_class($this)]))

0 commit comments

Comments
 (0)