• Resolved Jakobuz

    (@jakobuz)


    hello, don’t know why this suddenly happened. It worked good and from nowhere there is a fatal error:

    <b>Fatal error</b>:  Uncaught TypeError: stream_set_timeout(): Argument 
    #1 ($stream) must be of type resource, bool given in 
    /home/u162693p151405/domains/wijkverenigingpenseelstreek.nl/public_html/wordpress/wp-content/plugins/acymailing/back/libraries/wordpress/file.php:32
    
    

    Can you help me out with this?
    thank you in advance

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Jakobuz

    (@jakobuz)

    in addition some extra info about the error: my website is unreachable because of this fatal error. I had to disable the plugin via FTP, to make my site work again. Also I notice if I block out line 34 in “/plugins/acymailing/back/libraries/wordpress/file.php” the error is gone.

    Hello,

    When WordPress tries to check if a new version of AcyMailing is available, we override the check to get the data from our website rather than www.ads-software.com (to get the correct download link for the installed version, since only the starter version is available on www.ads-software.com).

    We had to temporary shut down our website to finish the migration of our license system.
    This should have been invisible for our users (they just shouldn’t have been able to see if a new version was available), however there was a lack of control in our code when trying to get the data from our website:

    When the external page can be reached everything is fine, but if it’s not reachable, the error you experienced happens.

    I prepared a modification for the next version of AcyMailing to patch this, but the error should be gone now as our website is no longer under maintenance.

    If anyone has the same error, a quick fix would be to modify the file wp-content/plugins/acymailing/back/libraries/wordpress/file.php and replace this code near the line 31:

    if (!empty($timeout)) {
        stream_set_timeout($handle, $timeout);
    }
    $data = stream_get_contents($handle);

    By:

    if (!empty($handle)) {
        if (!empty($timeout)) {
            stream_set_timeout($handle, $timeout);
        }
        $data = stream_get_contents($handle);
    }

    This should look like this:

    if (empty($data) && function_exists('fopen') && function_exists('stream_get_contents')) {
        $handle = fopen($url, 'r');
        if (!empty($handle)) {
            if (!empty($timeout)) {
                stream_set_timeout($handle, $timeout);
            }
            $data = stream_get_contents($handle);
        }
    }

    I’m sorry for the stress that it caused, please tell me if you notice anything strange, or if your website is still not working correctly.

    Thread Starter Jakobuz

    (@jakobuz)

    thanks for your explanation and the quick fix: it works!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘fatal error’ is closed to new replies.