• Resolved ngt4w0og

    (@moemorox)


    Hi,

    I’m using Docker with an alpine image for dev WPs.
    Alpine isn’t compiled with libc and so doesn’t support GLOB_BRACE. (Some more info: https://github.com/zendframework/zend-stdlib/issues/58, https://github.com/wp-cli/wp-cli/issues/4353)

    Warning: glob() expects parameter 2 to be integer, string given in /var/www/html/wp-content/plugins/types/vendor/toolset/toolset-common/utility/condition/theme/layouts-support/native/available.php on line 30
    
    Warning: Invalid argument supplied for foreach() in /var/www/html/wp-content/plugins/types/vendor/toolset/toolset-common/utility/condition/theme/layouts-support/native/available.php on line 30

    Can you check if GLOB_BRACE is supported/defined and if not, use something else?

    Thanks in advance!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Anonymous User 14808221

    (@anonymized-14808221)

    Honestly I am not qualified to answer in this specific case.

    What I know is that GLOB_RACE is not a potential issue to use:
    https://php.net/manual/en/function.glob.php

    And that it is a known issue on Alpine too:
    https://github.com/zendframework/zend-stdlib/issues/58

    I think that is where you should hook in, at Alpine’s Support.

    But I will ask first the Developers so to be sure.

    Thanks!

    Thread Starter ngt4w0og

    (@moemorox)

    Hi,

    thanks for your response!
    >What I know is that GLOB_RACE is not a potential issue to use
    Well, there’s at least a hint on the PHP docs:

    Note: The GLOB_BRACE flag is not available on some non GNU systems, like Solaris.

    I also know some webhosters who use Solaris, so it wouldn’t just affect me. ??

    IMHO a simple check à la defined('GLOB_BRACE') ? GLOB_BRACE : 0 should be fine(?, correct me when I’m wrong, dunno what glob() is used for in that usecase) to just suppress the warning.

    Thanks for your help!

    • This reply was modified 7 years, 3 months ago by ngt4w0og.
    Anonymous User 14808221

    (@anonymized-14808221)

    We will add a solution to the next version, I just got a confirmation from the lead Developer of Types.

    Thank you very much for the report, and your patience!

    Thread Starter ngt4w0og

    (@moemorox)

    I’m the one who should thank you!
    Wow, never seen such a fast support. ??

    Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘glob GLOB_BRACE check before use’ is closed to new replies.