Fixed the PHP warnings.

This commit is contained in:
mdtrooper 2014-09-10 13:09:04 +02:00
parent 225c3cc740
commit d6e31b6ab3

View File

@ -83,8 +83,12 @@ function clippy_write_javascript_helps_steps($tours) {
$clippy = get_cookie('clippy', false); $clippy = get_cookie('clippy', false);
set_cookie('clippy', null); set_cookie('clippy', null);
//Get the help steps from a task //Get the help steps from a task
$steps = null;
if (isset($tours['tours'][$clippy])) {
$steps = $tours['tours'][$clippy]['steps']; $steps = $tours['tours'][$clippy]['steps'];
}
if ($first_step_by_default) { if ($first_step_by_default) {
if (empty($steps)) { if (empty($steps)) {
//Get the first by default //Get the first by default
@ -106,8 +110,10 @@ function clippy_write_javascript_helps_steps($tours) {
} }
} }
} }
$conf = null;
if (isset($tours['tours'][$clippy])) {
$conf = $tours['tours'][$clippy]['conf']; $conf = $tours['tours'][$clippy]['conf'];
}
if ($first_step_by_default) { if ($first_step_by_default) {
if (empty($conf)) { if (empty($conf)) {
//Get the first by default //Get the first by default