changeset 75:5e76b6feb2ad

Correct check for matchlength.
author Tom Fredrik "BFG" Klaussen <bfg@blenning.no>
date Fri, 12 Oct 2012 01:19:23 +0200
parents 1d5166aba2c5
children fae4322d6c29
files StatusCodes.inc
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/StatusCodes.inc	Fri Oct 12 01:16:30 2012 +0200
+++ b/StatusCodes.inc	Fri Oct 12 01:19:23 2012 +0200
@@ -302,7 +302,7 @@
   {
     $matches = array();
     preg_match('/HTTP\/\S+\s(\d+)/', $header, $matches);
-    if ($matches->length < 1)
+    if (count($matches) < 1)
       throw new Exception("Not an http header");
     $n = $matches[1];
     return $n;