svn: /phd/trunk/ render.php

From: Date: Fri, 30 Oct 2009 20:41:42 +0000
Subject: svn: /phd/trunk/ render.php
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-5251@lists.php.net to get a copy of this message
danielc Fri, 30 Oct 2009 20:41:42 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=290091 Log: Suppress fopen warnings with @. Add comment as to why using fopen at all. Changed paths: U phd/trunk/render.php Modified: phd/trunk/render.php =================================================================== --- phd/trunk/render.php 2009-10-30 20:18:19 UTC (rev 290090) +++ phd/trunk/render.php 2009-10-30 20:41:42 UTC (rev 290091) @@ -10,7 +10,8 @@ function autoload($name) { $file = __INSTALLDIR__ . DIRECTORY_SEPARATOR . str_replace(array('\\', '_'), '/', $name) . '.php'; - if (!$fp = fopen($file,'r', true)) { + // Using fopen() because it has use_include_path parameter. + if (!$fp = @fopen($file, 'r', true)) { throw new \Exception('Cannot find file for ' . $name . ': ' . $file); } fclose($fp);

« previous php.doc.cvs (#5251) next »