wp-cli / rewrite-command

Lists or flushes the site's rewrite rules, updates the permalink structure.
MIT License
20 stars 13 forks source link

wp rewrite flush throws PHP Parse error #38

Closed florianbepunkt closed 5 years ago

florianbepunkt commented 5 years ago

Bug Report

Describe the current, buggy behavior Running wp rewrite flush from the wordpress:cli docker image in CircleCI gives me the following error:

PHP Parse error:  syntax error, unexpected ',' in phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1198) : eval()'d code on line 88
Exited with code 255

Other wp cli commands work fine.

Describe how other contributors can replicate this bug

Not suure. Run wordpress base docker image and wp:cli image in a circle ci job.

Describe what you would expect as the correct outcome

Expected command returns Success: Rewrite rules flushed.

Let us know what environment you are running this on CircleCi running the following docker image with wp cli:

FROM wordpress:cli

USER root

ENV PHP_INI_MEMORY_LIMIT 1024M
RUN echo 'memory_limit = ${PHP_INI_MEMORY_LIMIT}' > "$PHP_INI_DIR/php.ini"

RUN apk update && apk upgrade && \
    apk add --no-cache bash git openssh

USER www-data

(Paste the output of "wp cli info" into this box)

^@^@OS: Linux 4.10.0-35-generic #39~16.04.1-Ubuntu SMP Wed Sep 13 09:02:42 UTC 2017 x86_64
Shell:  
PHP binary: /usr/local/bin/php
PHP version:    7.3.9
php.ini used:   /usr/local/etc/php/php.ini
WP-CLI root dir:    phar://wp-cli.phar/vendor/wp-cli/wp-cli
WP-CLI vendor dir:  phar://wp-cli.phar/vendor
WP_CLI phar path:   /var/www/html
WP-CLI packages dir:    
WP-CLI global config:   
WP-CLI project config:  
WP-CLI version: 2.3.0
florianbepunkt commented 5 years ago

turns out to be a typo.