We are moving to Git Issues for bug tracking in future releases. During transition, content will be in both tools. If you'd like to file a new bug, please create an issue.

View | Details | Raw Unified | Return to bug 4836 | Differences between
and this patch

Collapse All | Expand All

(-)pkp/classes/core/PKPApplication.inc.php (-7 / +19 lines)
 Lines 13-19    Link Here 
13
 *
13
 *
14
 */
14
 */
15
15
16
// $Id: PKPApplication.inc.php,v 1.28 2009/09/22 23:56:56 asmecher Exp $
16
// $Id: PKPApplication.inc.php,v 1.29 2009/11/06 01:37:58 jerico.dev Exp $
17
17
18
18
19
define('REALLY_BIG_NUMBER', 10000);
19
define('REALLY_BIG_NUMBER', 10000);
 Lines 33-39    Link Here 
33
		Console::logSpeed('PKPApplication::construct');
33
		Console::logSpeed('PKPApplication::construct');
34
34
35
		// Inititalize the application.
35
		// Inititalize the application.
36
		error_reporting(E_ALL);
36
		if (defined(E_STRICT)) { // PHP5
37
			// FIXME: Error logging needs to be suppressed for strict
38
			// errors in PHP5 as long as we support PHP4. This
39
			// is primarily for static method warnings. Static class
40
			// members cannot be declared in PHP4.
41
			error_reporting(E_ALL & ~E_STRICT);
42
		} else { // PHP4
43
			error_reporting(E_ALL);
44
		}
37
45
38
		// Seed random number generator
46
		// Seed random number generator
39
		mt_srand(((double) microtime()) * 1000000);
47
		mt_srand(((double) microtime()) * 1000000);
 Lines 231-247    Link Here 
231
239
232
	/**
240
	/**
233
	 * Custom error handler
241
	 * Custom error handler
242
	 * 
243
	 * NB: Custom error handlers are called for all error levels
244
	 * independent of the error_reporting parameter.
234
	 * @param $errorno string
245
	 * @param $errorno string
235
	 * @param $errstr string
246
	 * @param $errstr string
236
	 * @param $errfile string
247
	 * @param $errfile string
237
	 * @param $errline string
248
	 * @param $errline string
238
	 */
249
	 */
239
	function errorHandler($errorno, $errstr, $errfile, $errline) {
250
	function errorHandler($errorno, $errstr, $errfile, $errline) {
240
		// FIXME: Error logging needs to be suppressed for strict
251
		// We only report/log errors if their corresponding
241
		// errors as long as we support PHP4 (2048 == E_STRICT). This
252
		// error level bit is set in error_reporting.
242
		// is primarily for static method warnings. (These cannot be
253
		// We have to check error_reporting() each time as
243
		// declared in PHP4.)
254
		// some application parts change the setting (e.g.
244
		if(error_reporting() != 0 && $errorno != 2048) {
255
		// smarty, adodb, certain plugins).
256
		if(error_reporting() & $errorno) {
245
			if ($errorno == E_ERROR) {
257
			if ($errorno == E_ERROR) {
246
				echo 'An error has occurred.  Please check your PHP log file.';
258
				echo 'An error has occurred.  Please check your PHP log file.';
247
			} elseif (Config::getVar('debug', 'display_errors')) {
259
			} elseif (Config::getVar('debug', 'display_errors')) {

Return to bug 4836