cvs: docweb /scripts notes_stats.php

From: Date: Thu, 18 Jan 2007 19:18:11 +0000
Subject: cvs: docweb /scripts notes_stats.php
Groups: php.doc.web 
Request: Send a blank email to doc-web+get-910@lists.php.net to get a copy of this message
colder Thu Jan 18 19:18:11 2007 UTC Modified files: /docweb/scripts notes_stats.php Log: Check for existance before using some vars. Notices--; http://cvs.php.net/viewvc.cgi/docweb/scripts/notes_stats.php?r1=1.11&r2=1.12&diff_format=u Index: docweb/scripts/notes_stats.php diff -u docweb/scripts/notes_stats.php:1.11 docweb/scripts/notes_stats.php:1.12 --- docweb/scripts/notes_stats.php:1.11 Mon Aug 1 00:41:01 2005 +++ docweb/scripts/notes_stats.php Thu Jan 18 19:18:11 2007 @@ -17,7 +17,7 @@ | Vincent Gevers <vincent@php.net> | | Credits: Sean Coates <sean@php.net> | +----------------------------------------------------------------------+ -$Id: notes_stats.php,v 1.11 2005/08/01 00:41:01 sean Exp $ +$Id: notes_stats.php,v 1.12 2007/01/18 19:18:11 colder Exp $ */ require_once '../build-ops.php'; @@ -58,7 +58,14 @@ for ($i = $first; $i <= $last; ++$i) { $line = fgets($s, 4096); - list($n, $subj, $author, $odate) = explode("\t", $line, 5); + $n = $subj = $author = $odate = null; + + $line_parts = explode("\t", $line, 5); + + if(isset($line_parts[0])) $n = $line_parts[0]; + if(isset($line_parts[1])) $subj = $line_parts[1]; + if(isset($line_parts[2])) $author = $line_parts[2]; + if(isset($line_parts[3])) $odate = $line_parts[3]; /* check if the server has closed the connection the program will continue to fetch data later */ @@ -66,7 +73,7 @@ break; } - echo "\r$i"; + echo "\n$i"; /* * What should be matched:

« previous php.doc.web (#910) next »