Fixes errors in tests and fixes has content in Custom Interval component
This commit is contained in:
parent
bbbe56378e
commit
6b3e273857
|
@ -327,7 +327,7 @@ class REST_Filters_Controller extends REST_Controller {
|
|||
$item_arr['enabled'] = $item->get_enabled_for_collection();
|
||||
}
|
||||
|
||||
$item_arr['filter_type_object'] = $item->get_filter_type_object()->_toArray();
|
||||
$item_arr['filter_type_object'] = $item->get_filter_type_object() ? $item->get_filter_type_object()->_toArray() : $item->get_filter_type_object();
|
||||
|
||||
return $item_arr;
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<div v-if="type === 'date'">
|
||||
<b-datepicker
|
||||
:placeholder="$i18n.get('label_selectbox_init')"
|
||||
:class="{'has-content': date_init !== undefined && date_init !== ''}"
|
||||
:class="{'has-content': date_init != undefined && date_init != ''}"
|
||||
v-model="date_init"
|
||||
size="is-small"
|
||||
@focus="isTouched = true"
|
||||
|
@ -12,7 +12,7 @@
|
|||
icon="calendar-today"/>
|
||||
<b-datepicker
|
||||
:placeholder="$i18n.get('label_selectbox_init')"
|
||||
:class="{'has-content': date_end !== undefined && date_end !== ''}"
|
||||
:class="{'has-content': date_end != undefined && date_end != ''}"
|
||||
v-model="date_end"
|
||||
size="is-small"
|
||||
@input="validate_values()"
|
||||
|
@ -25,7 +25,7 @@
|
|||
class="columns"
|
||||
v-else>
|
||||
<b-input
|
||||
:class="{'has-content': value_init !== undefined && value_init !== ''}"
|
||||
:class="{'has-content': value_init != undefined && value_init != ''}"
|
||||
size="is-small"
|
||||
type="number"
|
||||
step="any"
|
||||
|
@ -33,7 +33,7 @@
|
|||
class="column"
|
||||
v-model="value_init"/>
|
||||
<b-input
|
||||
:class="{'has-content': value_end !== undefined && value_end !== ''}"
|
||||
:class="{'has-content': value_end != undefined && value_end != ''}"
|
||||
size="is-small"
|
||||
type="number"
|
||||
step="any"
|
||||
|
|
|
@ -264,7 +264,7 @@ abstract class Importer {
|
|||
*/
|
||||
public function fetch_from_remote( $url ){
|
||||
$tmp = wp_remote_get( $url );
|
||||
if( isset( $tmp['body'] ) ){
|
||||
if( !is_wp_error($tmp) && isset( $tmp['body'] ) ){
|
||||
$file = fopen( $this->get_id().'.txt', 'w' );
|
||||
fwrite( $file, $tmp['body'] );
|
||||
fclose( $file );
|
||||
|
|
Loading…
Reference in New Issue