object-sync-for-salesforce icon indicating copy to clipboard operation
object-sync-for-salesforce copied to clipboard

PHP 5.6 syntax errors

Open jonathanstegall opened this issue 3 years ago • 1 comments

Describe the bug See this forum post.

The offending line of code is, at least:

// load mappings that match this criteria
// in this case, it's all mappings that correspond to the posted WordPress object.
$sf_mappings = $this->mappings->get_fieldmaps(
    null, // id field must be null for multiples.
    array_merge(
        $this->mappings->active_fieldmap_conditions,
        array(
            'wordpress_object' => $object_type,
        )
    ),
);

To Reproduce Steps to reproduce the behavior:

  1. Install PHP 5.6.
  2. Try to run the plugin

Additional context

That comma is incorrect, as it's essentially a list of parameters in a function call with a comma after the last one. I'm not positive that removing the comma would fix PHP 5.6 issue, but it's possible, and either way I really do think it was a mistake to put the comma in there.

jonathanstegall avatar Jun 29 '22 13:06 jonathanstegall

Presumably there are more commas to hunt down. It would be nice if it were possible to run 5.6 through Laravel Valet, but this is no longer supported. I'm not entirely sure what to do to further test all of this without a viable localhost. Maybe a VirtualBox kind of setup.

jonathanstegall avatar Jul 18 '22 17:07 jonathanstegall

In a future release, should instead just remove support for PHP versions below 7.4, as this is what wordpress.org now says.

jonathanstegall avatar Feb 05 '23 16:02 jonathanstegall