Skip to content

Commit 0e4ad5b

Browse files
committed
Bug Fix
1 parent fb62f01 commit 0e4ad5b

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

welcome.install

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
->execute();
1313

1414
if (!empty($entities['node'])) {
15-
$about = node_load(array_shift(array_keys($entities['node'])));
15+
$nids = array_keys($entities['node']);
16+
$about = node_load(array_shift($nids));
1617
}
1718
// If About page exists, unpublish it.
1819
if (!empty($about)) {
@@ -31,7 +32,8 @@
3132
->execute();
3233

3334
if (!empty($entities['node'])) {
34-
$about = node_load(array_shift(array_keys($entities['node'])));
35+
$nids = array_keys($entities['node']);
36+
$about = node_load(array_shift($nids));
3537
}
3638
// If default post still exists, unpublish it.
3739
if (!empty($about)) {
@@ -196,7 +198,7 @@
196198
}
197199

198200
// Create menu items for children of About
199-
if ($info['menu_parent'] == 'about') {
201+
if (isset($info['menu_parent']) && $info['menu_parent'] == 'about') {
200202
$item = array(
201203
'link_path' => 'node/' . $page->nid,
202204
'link_title' => $page->title,
@@ -213,7 +215,7 @@
213215
// END new nodes section
214216

215217
$format = filter_format_load('filtered_html');
216-
$format->filters['video_filter'] = (object) $FILTER_ARRAY;
218+
$format->filters['video_filter'] = (object) array();
217219
filter_format_save($format);
218220

219221
// Make sure filters are in the correct order

0 commit comments

Comments
 (0)