magento / magento/ece-tools

str_replace(): Argument #3 ($subject) must be of type array|string, int given

Open
#808 7 comments 0 reactions 1 assignee View on GitHub

@andriyShevtsov is already working on this.

Since May 31, 2022.

Progress: ready for dev
Dominant language
PHP
Stars
119
Forks
81
PR merge metrics
No merged PRs in 30d

Description

Preconditions
  1. Magento 2.4.4 EE
  2. PHP 8.1
  3. ece-tools 2002.1.10
Steps to reproduce
  1. In Platform.sh create non-master environment which is child of master.
  2. Wait for deployment and error.
Expected result
  1. Deployment should pass and step "Updating secure and unsecure URLs in app/etc/env.php file" shouldn't break
Actual result
  1. Getting error message on environments where deployment process has to update base_urls:

09:26:32 [2022-05-16T07:26:32.096155+00:00] INFO: Updating secure and unsecure URLs
09:26:32 [2022-05-16T07:26:32.096223+00:00] INFO: Updating secure and unsecure URLs in core_config_data table.
09:26:32 [2022-05-16T07:26:32.098462+00:00] INFO: Updating secure and unsecure URLs in app/etc/env.php file
09:26:32 [2022-05-16T07:26:32.098831+00:00] INFO: Set flag: var/.deploy_is_failed
09:26:32 [2022-05-16T07:26:32.098906+00:00] ERROR: str_replace(): Argument #3 ($subject) must be of type array|string, int given
09:26:32 [2022-05-16T07:26:32.110349+00:00] INFO: Set flag: var/.deploy_is_failed
09:26:32 W:
09:26:32 W: In Processor.php line 129:
09:26:32 W:
09:26:32 W: str_replace(): Argument #3 ($subject) must be of type array|string, int giv
09:26:32 W: en
09:26:32 W:
09:26:32 W:
09:26:32 W: In Environment.php line 94:
09:26:32 W:
09:26:32 W: str_replace(): Argument #3 ($subject) must be of type array|string, int giv
09:26:32 W: en
09:26:32 W:
09:26:32 W:
09:26:32 W: deploy
09:26:32 W:

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.