Skip to content

Commit

Permalink
Fix #11294: System notice undefined offset in print_test_row (check.php)
Browse files Browse the repository at this point in the history
$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>
  • Loading branch information
Kirill authored and davidhicks committed Feb 26, 2010
1 parent 6a42434 commit 6de2cea
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion admin/check.php
Expand Up @@ -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>';
}
Expand Down

0 comments on commit 6de2cea

Please sign in to comment.