Remove notice

This commit is contained in:
Champ Camba
2017-01-28 12:15:52 +08:00
parent 64fe56f911
commit a78b9be206
+1 -1
View File
@@ -30,7 +30,7 @@ class UM_Query {
$pages = $wpdb->get_results('SELECT * FROM '.$wpdb->posts.' WHERE post_type = "page" AND post_status = "publish" ', OBJECT);
$array = '';
$array = array();
if( $wpdb->num_rows > 0 ){
foreach ($pages as $page_data) {
$array[ $page_data->ID ] = $page_data->post_title;