Skip to content
This repository was archived by the owner on Sep 10, 2020. It is now read-only.

Commit 6c5c0a8

Browse files
authored
Merge pull request #34 from bytepixie/fix-non-object-on-expand-#33
Fix non object on expand
2 parents 47a455e + 148cca7 commit 6c5c0a8

File tree

3 files changed

+16
-10
lines changed

3 files changed

+16
-10
lines changed

.travis.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,11 @@ php:
1010
env:
1111
- WP_VERSION=3.9 WP_MULTISITE=0
1212
- WP_VERSION=3.9 WP_MULTISITE=1
13-
- WP_VERSION=latest WP_MULTISITE=0
14-
- WP_VERSION=latest WP_MULTISITE=1
13+
- WP_VERSION=4.6 WP_MULTISITE=0
14+
- WP_VERSION=4.6 WP_MULTISITE=1
15+
16+
services:
17+
- mysql
1518

1619
script:
1720
#

src/admin/class-options-pixie-admin.php

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -530,13 +530,16 @@ public function ajax_toggle_truncate() {
530530
$column = sanitize_key( $_REQUEST['column'] );
531531
$collapsed = sanitize_key( $_REQUEST['collapsed'] );
532532

533-
$item = apply_filters( 'options_pixie_get_item', null, array( 'blog_id' => $blog_id, 'option_id' => $option_id ) );
534-
$options['column'] = $column;
535-
$options['collapsed'] = ( 'true' === $collapsed ) ? false : true;
536-
$value = apply_filters( 'options_pixie_column_display', $item->{$column}, $item, $options );
537-
$row_actions = apply_filters( 'options_pixie_column_row_actions', $item->{$column}, $item, $options );
538-
$row_actions = apply_filters( 'options_pixie_format_row_actions', $row_actions );
539-
echo $value . $row_actions;
533+
$item = apply_filters( 'options_pixie_get_item', null, array( 'blog_id' => $blog_id, 'option_id' => $option_id ) );
534+
535+
if ( ! empty( $item ) ) {
536+
$options['column'] = $column;
537+
$options['collapsed'] = ( 'true' === $collapsed ) ? false : true;
538+
$value = apply_filters( 'options_pixie_column_display', $item->{$column}, $item, $options );
539+
$row_actions = apply_filters( 'options_pixie_column_row_actions', $item->{$column}, $item, $options );
540+
$row_actions = apply_filters( 'options_pixie_format_row_actions', $row_actions );
541+
echo $value . $row_actions;
542+
}
540543
wp_die();
541544
}
542545

tests/bin/run-travis-unittests.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
RUN_CMD="tests/bin/run-unittests.sh -d wordpress_test -u travis -h 127.0.0.1"
3+
RUN_CMD="tests/bin/run-unittests.sh -d wordpress_test -u root"
44

55
#
66
# Only run coverage check for one build as it's quite slow.

0 commit comments

Comments
 (0)