* Thus wrote John Holmes: > > This is the file that defines the custom stream and some of the > implementation. Not all methods are implemented, but I don't think that > matters to this issue. > -------------------- > Custom Stream Class: > <?php > > stream_wrapper_register('cache','CacheStream'); > > class CacheStream > { > public $fp = FALSE; > public $foo = FALSE; > > function stream_open($path, $mode, $options='', &$opened_path='') > { > $path = substr($path,8); > $this->fp = fopen($path,$mode); > $this->foo = ' Test String '; > var_dump($this->fp); > var_dump($this->foo); > return $this->fp; > }
change return to: return ($this->fp? true: false); technically, internally the function is treated as function &stream_open(...) and will convert the value to a boolean value as you were experiencing. Curt -- First, let me assure you that this is not one of those shady pyramid schemes you've been hearing about. No, sir. Our model is the trapezoid! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php