Fix default timeouts for z_(fetch|post)_url.
When fetching the default timouts from config, the result is converted
to an int via intval()
, the result of that again is compared strictly
to false
. Since 0 !== false, the default values will never be used,
and 0 (no timeout) is passed to curl.
This cause requests to hang indefinitely (or until they are killed) when receiving actions that require a lookup or fetch to another site as part of the request processing. (E.g webfinger, or fetching objects that we received an announce action for.) This again cause the request never to return a useful status to the site sending the action, and could cause them to think the Hubzilla site is dead.
This patch fixes this by comparing the fetched value from config to 0 instead of false, making the defaults work again if the config is not set (or set to 0).