Skip to content

Commit

Permalink
Fix for Bug #4850.
Browse files Browse the repository at this point in the history
Wrapped offending block in an isset() check to get rid of php notices in debug mode.
  • Loading branch information
vyshane committed Feb 28, 2006
1 parent 96ed436 commit 77230a8
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions user/edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -343,11 +343,14 @@
echo '<!--'."\n";

$authconfig = get_config( 'auth/' . $user->auth );
foreach ($fields as $field) {

foreach ($fields as $field) {
$configvariable = 'field_lock_' . $field;
if ( $authconfig->{$configvariable} === 'locked'
|| ($authconfig->{$configvariable} === 'unlockedifempty' && !empty($user->$field)) ) {
echo "eval('document.form.$field.disabled=true');\n";
if (isset($authconfig->{$configvariable})) {
if ( $authconfig->{$configvariable} === 'locked'
|| ($authconfig->{$configvariable} === 'unlockedifempty' && !empty($user->$field)) ) {
echo "eval('document.form.$field.disabled=true');\n";
}
}
}

Expand Down

0 comments on commit 77230a8

Please sign in to comment.