emile Tue Mar 13 23:57:46 2001 EDT
Modified files:
/php4/ext/midgard article.c
Log:
Test parameter for existance before use.
Index: php4/ext/midgard/article.c
diff -u php4/ext/midgard/article.c:1.15 php4/ext/midgard/article.c:1.16
--- php4/ext/midgard/article.c:1.15 Mon Mar 12 02:19:37 2001
+++ php4/ext/midgard/article.c Tue Mar 13 23:57:46 2001
@@ -1,4 +1,4 @@
-/* $Id: article.c,v 1.15 2001/03/12 10:19:37 davidg Exp $
+/* $Id: article.c,v 1.16 2001/03/14 07:57:46 emile Exp $
Copyright (C) 1999 Jukka Zitting <[EMAIL PROTECTED]>
Copyright (C) 2000 The Midgard Project ry
Copyright (C) 2000 Emile Heyns, Aurora SA <[EMAIL PROTECTED]>
@@ -852,7 +852,7 @@
if (!mgd_exists_id(mgd_handle(), "topic", "id=$d", (*topic)->value.lval))
RETURN_FALSE_BECAUSE(MGD_ERR_NOT_EXISTS);
- if ((*up)->value.lval != 0 && !mgd_exists_id(mgd_handle(), "article", "id=$d",
(*up)->value.lval))
+ if (up && (*up)->value.lval != 0 && !mgd_exists_id(mgd_handle(), "article",
+"id=$d", (*up)->value.lval))
RETURN_FALSE_BECAUSE(MGD_ERR_NOT_EXISTS);
if (!istopicowner((*topic)->value.lval)) {
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]