From 055eefb19f7a4ae7d6492e9ef26249708ba2b0b8 Mon Sep 17 00:00:00 2001 From: ryan Date: Sun, 23 Jul 2006 18:23:43 +0000 Subject: [PATCH] Snoopy fread fixes. Props JeremyVisser. fixes #2733 git-svn-id: http://svn.automattic.com/wordpress/trunk@4030 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-snoopy.php | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/wp-includes/class-snoopy.php b/wp-includes/class-snoopy.php index 0149582a8..addd7578e 100644 --- a/wp-includes/class-snoopy.php +++ b/wp-includes/class-snoopy.php @@ -78,7 +78,7 @@ class Snoopy var $error = ""; // error messages sent here var $response_code = ""; // response code returned from server var $headers = array(); // headers returned from server sent here - var $maxlength = 500000; // max return data length (body) + var $maxlength = 8192; // max return data length (body) var $read_timeout = 0; // timeout on read operations, in seconds // supported only since PHP 4 Beta 4 // set to 0 to disallow timeouts @@ -720,13 +720,13 @@ class Snoopy chr(176), chr(39), chr(128), - "ä", - "ö", - "ü", - "Ä", - "Ö", - "Ü", - "ß", + "�", + "�", + "�", + "�", + "�", + "�", + "�", ); $text = preg_replace($search,$replace,$document); @@ -1238,7 +1238,9 @@ class Snoopy if (!is_readable($file_name)) continue; $fp = fopen($file_name, "r"); - $file_content = fread($fp, filesize($file_name)); + while (!feof($fp)) { + $file_content = fread($fp, filesize($file_name)); + } fclose($fp); $base_name = basename($file_name);