View Issue Details

IDProjectCategoryView StatusLast Update
0011294mantisbtadministrationpublic2010-04-23 14:30
ReporterKirill Assigned Todhx  
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Product Versiongit trunk 
Target Version1.2.1Fixed in Version1.2.1 
Summary0011294: System notice in checking
Description
  1. SYSTEM NOTICE
    Undefined variable: t_version_suffix
    Full path: /mantis/admin/index.php
    Line: 60

  2. SYSTEM NOTICE
    Undefined offset: 1
    Full path: /mantis/admin/check.php
    Line: 73
    Variable Value Type
    p_description Checking Config File Exists string
    p_pass 1 boolean
    f_showall 1 integer
    Variable Value Type
    0 Please use install.php to perform initial installation <a href="install.php">Click here</a> string

TagsNo tags attached.
Attached Files
Issue11294.patch (1,696 bytes)   
From 223d88fcaaf89c8454c82aef895c31db90a50b1f Mon Sep 17 00:00:00 2001
From: Kirill Krasnov <krasnovforum@gmail.com>
Date: Sat, 19 Dec 2009 11:18:41 +0200
Subject: [PATCH] Fix checking

---
 admin/check.php |    2 +-
 admin/index.php |    1 +
 2 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/admin/check.php b/admin/check.php
index 53f4b04..c638ea8 100644
--- a/admin/check.php
+++ b/admin/check.php
@@ -250,7 +250,7 @@ function test_database_utf8() {
 
 print_test_row( 'MantisBT requires at least <b>PHP ' . PHP_MIN_VERSION . '</b>. You are running <b>PHP ' . phpversion(), $result = version_compare( phpversion(), PHP_MIN_VERSION, '>=' ) );
 
-if ( !print_test_row( 'Checking Config File Exists', file_exists( $g_absolute_path . 'config_inc.php' ), array( false => 'Please use install.php to perform initial installation <a href="install.php">Click here</a>' ) ) ) {
+if ( !print_test_row( 'Checking Config File Exists', file_exists( $g_absolute_path . 'config_inc.php' ), array( false => 'Please use install.php to perform initial installation <a href="install.php">Click here</a>', true => '' ) ) ) {
 	die;
 }
 
diff --git a/admin/index.php b/admin/index.php
index 09992b4..13e9260 100644
--- a/admin/index.php
+++ b/admin/index.php
@@ -57,6 +57,7 @@ function print_info_row( $p_description, $p_value ) {
 <td class="form-title" width="30%" colspan="2"><?php echo lang_get( 'install_information' ) ?></td>
 </tr>
 <?php 
+	$t_version_suffix = config_get_global( 'version_suffix' );
 	print_info_row( lang_get( 'mantis_version' ), MANTIS_VERSION, ( $t_version_suffix ? " $t_version_suffix" : '' ) );
 	print_info_row( 'php_version', phpversion());
 ?>
-- 
1.6.5.1.1367.gcd48

Issue11294.patch (1,696 bytes)   
2010-02-11 09 01 16.png (20,737 bytes)   
2010-02-11 09 01 16.png (20,737 bytes)   
Issue11294_2.diff (836 bytes)   
From 9dc98e0111433a83151f157db9fa0237c2319fa1 Mon Sep 17 00:00:00 2001
From: Kirill Krasnov <krasnovforum@gmail.com>
Date: Thu, 11 Feb 2010 10:10:03 +0200
Subject: [PATCH] Fix #11294 checking config_inc.php

---
 admin/check.php |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/admin/check.php b/admin/check.php
index ed5c155..d859216 100644
--- a/admin/check.php
+++ b/admin/check.php
@@ -73,7 +73,9 @@ function print_test_row( $p_description, $p_pass, $p_info = null ) {
 	echo '<tr><td bgcolor="#ffffff">' .$p_description;
 	if( $p_info != null) {
 		if( is_array( $p_info ) ) {
-			echo '<br /><i>' . $p_info[$p_pass] . '</i>';
+			if( isset( $p_info[$p_pass] ) ) {
+				echo '<br /><i>' . $p_info[$p_pass] . '</i>';
+			}
 		} else {
 			echo '<br /><i>' . $p_info . '</i>';
 		}
-- 
1.6.5.1.1367.gcd48

Issue11294_2.diff (836 bytes)   

Activities

siebrand

siebrand

2009-12-21 12:48

developer   ~0023945

Fixed in master with commit 0ddfc76a22f1fc808baf7c8993cd51cd8f005e8b

Thanks.

Kirill

Kirill

2010-02-11 02:01

reporter   ~0024373

http://git.mantisbt.org/?p=mantisbt.git;a=commitdiff;h=ac6543d10705ba25889c5b04f37f42c0dda28207
This break checkin
I have error in screenshot.

Kirill

Kirill

2010-02-11 03:23

reporter   ~0024374

Add another fix

dhx

dhx

2010-02-26 18:31

reporter   ~0024551

Thanks Kirill, I've applied your patch.

Related Changesets

MantisBT: master 0ddfc76a

2009-12-21 12:47

siebrand


Details Diff
Fix 0011294: Fix PHP notices. Patch contributed by Krasnov Kirill Affected Issues
0011294
mod - admin/index.php Diff File
mod - admin/check.php Diff File

MantisBT: master-1.2.x 647cf03f

2010-02-11 03:10

Kirill Krasnov

Committer: dhx


Details Diff
Fix 0011294: System notice undefined offset in print_test_row (check.php)

$p_info[$p_pass] is not always defined and therefore we need to check
that array element exists before attempting to print it out to the user.

Signed-off-by: David Hicks <hickseydr@optusnet.com.au>
Affected Issues
0011294
mod - admin/check.php Diff File

MantisBT: master 6de2cea9

2010-02-11 03:10

Kirill Krasnov

Committer: dhx


Details Diff
Fix 0011294: System notice undefined offset in print_test_row (check.php)

$p_info[$p_pass] is not always defined and therefore we need to check
that array element exists before attempting to print it out to the user.

Signed-off-by: David Hicks <hickseydr@optusnet.com.au>
Affected Issues
0011294
mod - admin/check.php Diff File