MDL-11748 add "protection" to avoid Notices in the A-Z name selector, merged from 19
This commit is contained in:
+3
-3
@@ -551,7 +551,7 @@ class flexible_table {
|
||||
$alpha = explode(',', get_string('alphabet'));
|
||||
|
||||
// Bar of first initials
|
||||
|
||||
|
||||
echo '<div class="initialbar firstinitial">'.get_string('firstname').' : ';
|
||||
if(!empty($this->sess->i_first)) {
|
||||
echo '<a href="'.$this->baseurl.$this->request[TABLE_VAR_IFIRST].'=">'.$strall.'</a>';
|
||||
@@ -559,7 +559,7 @@ class flexible_table {
|
||||
echo '<strong>'.$strall.'</strong>';
|
||||
}
|
||||
foreach ($alpha as $letter) {
|
||||
if ($letter == $this->sess->i_first) {
|
||||
if (isset($this->sess->i_first) && $letter == $this->sess->i_first) {
|
||||
echo ' <strong>'.$letter.'</strong>';
|
||||
} else {
|
||||
echo ' <a href="'.$this->baseurl.$this->request[TABLE_VAR_IFIRST].'='.$letter.'">'.$letter.'</a>';
|
||||
@@ -576,7 +576,7 @@ class flexible_table {
|
||||
echo '<strong>'.$strall.'</strong>';
|
||||
}
|
||||
foreach ($alpha as $letter) {
|
||||
if ($letter == $this->sess->i_last) {
|
||||
if (isset($this->sess->i_last) && $letter == $this->sess->i_last) {
|
||||
echo ' <strong>'.$letter.'</strong>';
|
||||
} else {
|
||||
echo ' <a href="'.$this->baseurl.$this->request[TABLE_VAR_ILAST].'='.$letter.'">'.$letter.'</a>';
|
||||
|
||||
Reference in New Issue
Block a user