#24830 [NEW]: Problem with $fp in Remote.php

From: Date: Sun, 27 Jul 2003 15:02:11 +0000
Subject: #24830 [NEW]: Problem with $fp in Remote.php
Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-18794@lists.php.net to get a copy of this message
From: nicos@php.net Operating system: Every PHP version: Irrelevant PHP Bug Type: PEAR related Bug description: Problem with $fp in Remote.php Description: ------------ Warning: fwrite(): supplied argument is not a valid stream resource in Remote.php on line 95 Warning: fclose(): supplied argument is not a valid stream resource in Remote.php on line 96 In fact the $fp verification is not correct. But hey, here is the patch ! cvs server: Diffing . Index: Remote.php =================================================================== RCS file: /repository/php-src/pear/PEAR/Remote.php,v retrieving revision 1.41 diff -u -u -r1.41 Remote.php --- Remote.php 12 Jul 2003 14:25:06 -0000 1.41 +++ Remote.php 27 Jul 2003 14:58:53 -0000 @@ -91,7 +91,7 @@ $filename = $cachedir.'/xmlrpc_cache_'.$id; $fp = @fopen($filename, "wb"); - if ($fp !== null) { + if ($fp !== false) { fwrite($fp, serialize($data)); fclose($fp); }; Reproduce code: --------------- pear info spplus as non root. Expected result: ---------------- correct stuff? ;-) Actual result: -------------- notices. -- Edit bug report at http://bugs.php.net/?id=24830&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=24830&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=24830&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=24830&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=24830&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=24830&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=24830&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=24830&r=support Expected behavior: http://bugs.php.net/fix.php?id=24830&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=24830&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=24830&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=24830&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=24830&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=24830&r=dst IIS Stability: http://bugs.php.net/fix.php?id=24830&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=24830&r=gnused

« previous php.pear.dev (#18794) next »