[Phpfreechat-svn] SF.net SVN: phpfreechat: [846] trunk/src
Status: Beta
Brought to you by:
kerphi
From: <ke...@us...> - 2006-10-28 17:03:41
|
Revision: 846 http://svn.sourceforge.net/phpfreechat/?rev=846&view=rev Author: kerphi Date: 2006-10-28 10:03:31 -0700 (Sat, 28 Oct 2006) Log Message: ----------- [en] Add traces and error messages for debug [50min] [fr] Ajout de traces et de messages d'erreur pour le debug [50min] Modified Paths: -------------- trunk/src/pfccontainer.class.php trunk/src/pfctools.php Modified: trunk/src/pfccontainer.class.php =================================================================== --- trunk/src/pfccontainer.class.php 2006-10-28 17:01:17 UTC (rev 845) +++ trunk/src/pfccontainer.class.php 2006-10-28 17:03:31 UTC (rev 846) @@ -45,6 +45,11 @@ { $c =& $this->c; + if ($nick == '') + user_error('pfcContainer::createNick nick is empty', E_USER_ERROR); + if ($nickid == '') + user_error('pfcContainer::createNick nickid is empty', E_USER_ERROR); + if ($chan == NULL) $chan = 'SERVER'; $this->setMeta("nickid-to-metadata", $nickid, 'nick', $nick); Modified: trunk/src/pfctools.php =================================================================== --- trunk/src/pfctools.php 2006-10-28 17:01:17 UTC (rev 845) +++ trunk/src/pfctools.php 2006-10-28 17:03:31 UTC (rev 846) @@ -316,7 +316,7 @@ // If we don't have a string, throw an error if (!is_scalar($content)) { - user_error('file_put_contents() The 2nd parameter should be either a string or an array', + user_error('file_put_contents() The 2nd parameter should be either a string or an array ['.$filename.']', E_USER_WARNING); return false; } @@ -336,7 +336,7 @@ // Open the file for writing if (($fh = @fopen($filename, $mode, $use_inc_path)) === false) { - user_error('file_put_contents() failed to open stream: Permission denied', + user_error('file_put_contents() failed to open stream: Permission denied ['.$filename.']', E_USER_WARNING); return false; } @@ -352,7 +352,7 @@ // Write to the file $bytes = 0; if (($bytes = @fwrite($fh, $content)) === false) { - $errormsg = sprintf('file_put_contents() Failed to write %d bytes to %s', + $errormsg = sprintf('file_put_contents() Failed to write %d bytes to %s ['.$filename.']', $length, $filename); user_error($errormsg, E_USER_WARNING); @@ -364,7 +364,7 @@ // Check all the data was written if ($bytes != $length) { - $errormsg = sprintf('file_put_contents() Only %d of %d bytes written, possibly out of free disk space.', + $errormsg = sprintf('file_put_contents() Only %d of %d bytes written, possibly out of free disk space. ['.$filename.']', $bytes, $length); user_error($errormsg, E_USER_WARNING); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |