X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=scripts%2Fgen_curlinfo.php;fp=scripts%2Fgen_curlinfo.php;h=a07af2281c2f5485497814a9754e4ff3a9459d06;hp=f9d83f653128008479d4ece2febe7596fb51489a;hb=dd07cdeb2ed9752a82c9d052b42af2d639a785fd;hpb=bdcc6697f7dd2a636efe363d7208e3832692b1ec diff --git a/scripts/gen_curlinfo.php b/scripts/gen_curlinfo.php index f9d83f6..a07af22 100644 --- a/scripts/gen_curlinfo.php +++ b/scripts/gen_curlinfo.php @@ -4,7 +4,9 @@ error_reporting(0); function failure() { - fprintf(STDERR, "FAILURE: %s\n", error_get_last()); + // this is why error_get_last() should return a stdClass object + $error = error_get_last(); + fprintf(STDERR, "FAILURE: %s\n", $error["message"]); exit(-1); }