What steps will reproduce the problem?
1. Fetch a URL that is wrong, or the HMTL $response is missing <title> tags, or
if there is a server configuration issue that is breaking cURL
2. Run example.php
What is the expected output? What do you see instead?
No output, as expected, but PHP raises:
PHP Notice: Undefined variable: title in /example.php on line 19
What version of the product are you using? On what operating system?
r20 Sep 12, 2010 on CentOS 6.2
Please provide any additional information below.
The PHP notice can be fixed by moving the echo $title inside the if block. e.g.,
if (preg_match("~<title>(.*?)</title>~i", $response, $out)) {
$title = $out[1];
echo "<b>$title</b><br />";
} else {
echo "<i>page title not found</i><br />";
};
Original issue reported on code.google.com by nickcons...@googlemail.com on 12 Apr 2014 at 11:21
Original issue reported on code.google.com by
nickcons...@googlemail.com
on 12 Apr 2014 at 11:21