Permalink
Browse files

Prevent HTML dump in console

  • Loading branch information...
1 parent 4805ada commit efddd8e13a6e948299638722365e9ab699e31efa @ccesario committed Aug 14, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 pfsensebkp/pfsensebkp.php
@@ -188,13 +188,14 @@ function createBackup($configHost = array())
// login and set cookie
curl_setopt($ch, CURLOPT_COOKIEJAR, $ckfile);
+ curl_setopt ($ch, CURLOPT_RETURNTRANSFER, true);
$data_file = curl_exec($ch);
$http_url = curl_getinfo($ch, CURLINFO_EFFECTIVE_URL);
$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
// check Sucesss
- if (($data_file) && ($http_code == '302')) {
+ if ($http_code == '302') {
// post params
// get backup

0 comments on commit efddd8e

Please sign in to comment.