Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

sendHttpRequest() erroneously returning "1" #1393

Closed
robocoder opened this Issue · 10 comments

3 participants

@robocoder

Three forum posters and one email to hello@piwik.org all reporting that the Piwik dashboard now says the current version available for download is "1".

@robocoder

(In [2239]) fixes #1393 - see http://bugs.php.net/39034; we now check for boolean true and set the response to an empty string to avoid the cast, i.e., (string)true == "1"

@robocoder

According to man page for curl_setopt_array(), it'll return false immediately (ignoring future options) if it encounters an option that it can't set (from the options array parameter).

@robocoder

(In [2242]) fixes #1393 - we now setopt() CURLOPT_FILE or CURLOPT_RETURNTRANSFER separately in case curl_setopt_array() failed early; we also wrap ob_start() ... ob_end_clean() around curl_exec() to protect against output leaking to browser for some other reason

@robocoder

(In [2243]) refs #1393 - I dug deeper into the libcurl source and change history, and as a result, I'm reordering the curl options based on level of support in libcurl, i.e., oldest to latest version, increasing the likelihood that all settable options are set; added some comments

@robocoder

(In [2244]) refs #1393 - and this is based on a review of ext/curl; the workaround (not yet implemented) is to parse the Location: headers manually

@mattab
Owner

Anthon, can you confirm you tested the code when a new release is published and that it displays the version number properly + downloads the files? thanks

@jpfleury

I updated Piwik to version 0.6.4, and I still have this bug. In the top and to the right of the screen, it's written:

New Update: Piwik 1

and if I move the cursor over:

Piwik 1 est maintenant disponible.
Merci de mettre jour! (voir les modifications).

@robocoder

jpfle: this was fixed in 0.6.3; if you upgraded from an earlier version, then you'll have to wait up to 8 hrs for your site to re-ping our server.

You can reset it manually, e.g.,

UPDATE piwik_option SET option_value='0' WHERE option_name='UpdateCheck_LastTimeChecked';

Then refresh your dashboard.

If that doesn't work, then send me an email (anthon at piwik.org) with your phpinfo().

@jpfleury

Replying to vipsoft:

jpfle: this was fixed in 0.6.3; if you upgraded from an earlier version, then you'll have to wait up to 8 hrs for your site to re-ping our server.

You can reset it manually, e.g.,

UPDATE piwik_option SET option_value='0' WHERE option_name='UpdateCheck_LastTimeChecked';

Then refresh your dashboard.

You're right. That was the problem. Thanks a lot.

@robocoder robocoder added this to the Piwik 0.6.3 milestone
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.