Code in ctools_component_features_export_render():

    $code = explode('}', implode($code, "{\n"));

Looks wrong?
Interestingly it does work! https://3v4l.org/5h9GH
But not for long. Starting PHP 7.4, we will get this deprecation notice:

Deprecated: implode(): Passing glue string after array is deprecated. Swap the parameters in /in/5h9GH on line 3

Let's stick to the normal way of calling implode().

Comments

donquixote created an issue. See original summary.

donquixote’s picture

Interestingly it does work! https://3v4l.org/5h9GH

Which also means this can be fixed without fear of regressions.

  • donquixote committed 8fd454a on issue-3075578-7x2x-implode-args-in-ctools_component_features_export_render
    Issue #3075578: Fix argument order when calling implode(), in...
donquixote’s picture

Status: Active » Needs review
StatusFileSize
new574 bytes
damienmckenna’s picture

Issue tags: +PHP 7.4
jacob.embree’s picture

Status: Needs review » Reviewed & tested by the community
hargobind’s picture

The patch in #4 looks good, and should be simple enough to commit without tests. RTBC++

donquixote’s picture

Thanks @jacob.embree and @hargobind for reviewing and testing!

  • donquixote committed 0bec261 on 7.x-2.x
    Issue #3075578 by donquixote, jacob.embree, hargobind: implode() called...
donquixote’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.