[pLog-svn] r6050 - plog/trunk/class/dao

Jon Daley plogworld at jon.limedaley.com
Sat Nov 17 09:03:16 EST 2007


 	What does it mean for $res to be empty (ie. when does that 
happen)?  I don't see any 
references to it being empty in the php documentation.  It does seem like 
we should be checking the return value of preg_match though.

On Sat, 17 Nov 2007, mark at devel.lifetype.net wrote:

> Author: mark
> Date: 2007-11-17 02:33:02 -0500 (Sat, 17 Nov 2007)
> New Revision: 6050
>
> Modified:
>   plog/trunk/class/dao/trackbackclient.class.php
> Log:
> Fixed a bug in trackback client. Weird, why there is no people complain about this bug when thet use the trackbackUrls fields.
>
> Modified: plog/trunk/class/dao/trackbackclient.class.php
> ===================================================================
> --- plog/trunk/class/dao/trackbackclient.class.php	2007-11-17 06:54:19 UTC (rev 6049)
> +++ plog/trunk/class/dao/trackbackclient.class.php	2007-11-17 07:33:02 UTC (rev 6050)
> @@ -122,7 +122,8 @@
>         		return false;
>
>         	preg_match( "/.*<error>(.*)<\/error>.*/", $s->results, $res );
> -        	if( $res[1] == 1 )
> +
> +        	if( empty($res) || $res[1] == 1 )
>         		return false;
>         	else
>         		return true;
>
> _______________________________________________
> pLog-svn mailing list
> pLog-svn at devel.lifetype.net
> http://limedaley.com/mailman/listinfo/plog-svn
>

-- 
Jon Daley
http://jon.limedaley.com/

Sometimes being smart is a handicap.
Smart people are often too smart to take advice from others.
-- Al Ries


More information about the pLog-svn mailing list