Skip to content

Commit 06c9ee3

Browse files
author
Marius van Witzenburg
committed
Fixed several undefined errors.
1 parent f044e61 commit 06c9ee3

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

inc/common.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1860,7 +1860,7 @@ function valid_input_set($param, $valid_values, $array, $exc = '') {
18601860
*/
18611861
function get_doku_pref($pref, $default) {
18621862
$enc_pref = urlencode($pref);
1863-
if(strpos($_COOKIE['DOKU_PREFS'], $enc_pref) !== false) {
1863+
if(isset($_COOKIE['DOKU_PREFS']) && strpos($_COOKIE['DOKU_PREFS'], $enc_pref) !== false) {
18641864
$parts = explode('#', $_COOKIE['DOKU_PREFS']);
18651865
$cnt = count($parts);
18661866
for($i = 0; $i < $cnt; $i += 2) {

lib/exe/css.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -296,12 +296,12 @@ function css_styleini($tpl, $preview=false) {
296296
$data = parse_ini_file($ini, true);
297297

298298
// stylesheets
299-
if(is_array($data['stylesheets'])) foreach($data['stylesheets'] as $file => $mode){
299+
if(isset($data['stylesheets']) && is_array($data['stylesheets'])) foreach($data['stylesheets'] as $file => $mode){
300300
$stylesheets[$mode][$incbase.$file] = $webbase;
301301
}
302302

303303
// replacements
304-
if(is_array($data['replacements'])){
304+
if(isset($data['replacements']) && is_array($data['replacements'])){
305305
$replacements = array_merge($replacements, css_fixreplacementurls($data['replacements'],$webbase));
306306
}
307307
}

0 commit comments

Comments
 (0)