• Resolved th3br41n

    (@th3br41n)


    Please note that global $hefo_options does not always guarantee that $hefo_options is correctly assigned. For examples see this code:

    === file test.php ===

    <?php
    
    $hefo_options = 'this is a test';
    
    function test1()
    {
        global $hefo_options;
    
        var_export($hefo_options);
    }
    
    function test2()
    {
        test1();
    }

    === file test1.php ===

    <?php
    
    function init()
    {
        include_once __DIR__ . '/test.php';
    }
    
    init();
    echo 'test1:' . function_exists('test1') . PHP_EOL; //shows 'test1:1'
    echo 'test2:' . function_exists('test2') . PHP_EOL; //shows 'test2:1'
    test1(); //shows null
    test2(); //shows null

    Actually, sometimes this bug occurs within the function hefo_wp_head_post in the plugin.php file.

    • This topic was modified 7 years, 11 months ago by th3br41n.

The topic ‘Bug with $hefo_options?’ is closed to new replies.