• Hi,

    on the admin page, I have a message :
    Warning: Use of undefined constant GLOB_BRACE - assumed 'GLOB_BRACE' (this will throw an Error in a future version of PHP) in /var/www/XXX/web/wp-content/plugins/merge-minify-refresh/merge-minify-refresh.php on line 286

    and
    Warning: glob() expects parameter 2 to be integer, string given in /var/www/XXX/web/wp-content/plugins/merge-minify-refresh/merge-minify-refresh.php on line 286

    It’s because alpine doesn’t have it in libc…
    Somes explication: https://github.com/wp-cli/wp-cli/issues/4353#issuecomment-330061786

    wp-cli have a fixe, but I thinks that use another PHP function is a good issue…

    • This topic was modified 6 years, 11 months ago by llaumgui.
    • This topic was modified 6 years, 11 months ago by llaumgui.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter llaumgui

    (@llaumgui)

    Work with this patch:

    32d31
    <     private $globbrace = 0;
    48,52c47
    < 		/*
    <         Check if GLOB_BRACE is defined before using it
    <         */
    <         $this->globbrace = (defined('GLOB_BRACE')) ? GLOB_BRACE : 0;
    < 
    ---
    > 		
    161c156
    < 		$files = glob(MMR_CACHE_DIR.'/*.log', $this->globbrace);
    ---
    > 		$files = glob(MMR_CACHE_DIR.'/*.log', GLOB_BRACE);
    230c225
    < 		$files = glob(MMR_CACHE_DIR.'/'.$hash.'*.log', $this->globbrace);
    ---
    > 		$files = glob(MMR_CACHE_DIR.'/'.$hash.'*.log', GLOB_BRACE);
    232c227
    < 		$files = glob(MMR_CACHE_DIR.'/*.log', $this->globbrace);
    ---
    > 		$files = glob(MMR_CACHE_DIR.'/*.log', GLOB_BRACE);
    253c248
    < 		foreach(glob($dir.'/{,.}*', $this->globbrace) as $file) { 
    ---
    > 		foreach(glob($dir.'/{,.}*', GLOB_BRACE) as $file) { 
    291c286
    < 		$files = glob(MMR_CACHE_DIR.'/*.{js,css}', $this->globbrace);
    ---
    > 		$files = glob(MMR_CACHE_DIR.'/*.{js,css}', GLOB_BRACE);
    
    Thread Starter llaumgui

    (@llaumgui)

    Not possible to patch for alpine Linux ?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Not compatible with PHP Alpine Docker image’ is closed to new replies.