From: <var...@us...> - 2021-07-23 17:31:24
|
Revision: 10361 http://sourceforge.net/p/phpwiki/code/10361 Author: vargenau Date: 2021-07-23 17:31:23 +0000 (Fri, 23 Jul 2021) Log Message: ----------- lib/WikiUser/File.php: do not create File_Passwd with empty file, do not return from constructor Modified Paths: -------------- trunk/lib/WikiUser/File.php Modified: trunk/lib/WikiUser/File.php =================================================================== --- trunk/lib/WikiUser/File.php 2021-07-23 16:20:12 UTC (rev 10360) +++ trunk/lib/WikiUser/File.php 2021-07-23 17:31:23 UTC (rev 10361) @@ -50,11 +50,12 @@ // same style as in main.php include_once(dirname(__FILE__) . "/../pear/File_Passwd.php"); // "__PHP_Incomplete_Class" - if (!empty($file) or empty($this->_file) or !is_a($this->_file, "File_Passwd")) + if (empty($file)) { + return; + } + if (empty($this->_file) or !is_a($this->_file, "File_Passwd")) { $this->_file = new File_Passwd($file, false, $file . '.lock'); - else - return false; - return $this; + } } function mayChangePass() @@ -110,5 +111,4 @@ } return false; } - } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |