cvs: docweb /www/rfc rfc-proposal-edit.php

From: Date: Sun, 12 Sep 2004 19:19:49 +0000
Subject: cvs: docweb /www/rfc rfc-proposal-edit.php
Groups: php.doc.web 
Request: Send a blank email to doc-web+get-294@lists.php.net to get a copy of this message
sean Sun Sep 12 15:19:49 2004 EDT Modified files: /docweb/www/rfc rfc-proposal-edit.php Log: prevents "Notice: Trying to get property of non-object in .../docweb/www/rfc/rfc-proposal-edit.php on line 168" http://cvs.php.net/diff.php/docweb/www/rfc/rfc-proposal-edit.php?r1=1.10&r2=1.11&ty=u Index: docweb/www/rfc/rfc-proposal-edit.php diff -u docweb/www/rfc/rfc-proposal-edit.php:1.10 docweb/www/rfc/rfc-proposal-edit.php:1.11 --- docweb/www/rfc/rfc-proposal-edit.php:1.10 Sun Sep 12 03:39:02 2004 +++ docweb/www/rfc/rfc-proposal-edit.php Sun Sep 12 15:19:49 2004 @@ -22,7 +22,7 @@ * @author Daniel Convissor <danielc@php.net> * @copyright Copyright (c) 1997-2004 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License - * @version $Id: rfc-proposal-edit.php,v 1.10 2004/09/12 07:39:02 vincent Exp $ + * @version $Id: rfc-proposal-edit.php,v 1.11 2004/09/12 19:19:49 sean Exp $ */ /** @@ -47,7 +47,7 @@ ob_start(); -if ($proposal =& proposal::get($dbh, @$_GET['id'])) { +if (proposal =& proposal::get($dbh, @$_GET['id'])) { echo site_header('RFC :: Editor :: ' @@ -165,12 +165,14 @@ $form->addElement('static', '', '', 'Upload a file or link to your files'); $filecount = 0; - $filecount = explode('|', $proposal->pkg_filehash); + if ($proposal) { + $filecount = explode('|', $proposal->pkg_filehash); - if (@$filecount[1] == '') { // failed, no files - $filecount = 0; - } else { - $filecount = (count($filecount) -1); + if (@$filecount[1] == '') { // failed, no files + $filecount = 0; + } else { + $filecount = (count($filecount) -1); + } } if (isset($_POST['submit']) AND !empty($_FILES['thefile']['name']))

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