Update code for PHP 5.5
[MAILPOET-1496]
This commit is contained in:
@@ -460,7 +460,7 @@ class Newsletter extends Model {
|
||||
|
||||
function withDeletedSegments() {
|
||||
if(!empty($this->segments)) {
|
||||
$segment_ids = Helpers::arrayColumn($this->segments, 'id');
|
||||
$segment_ids = array_column($this->segments, 'id');
|
||||
$links = $this->segmentRelations()
|
||||
->whereNotIn('segment_id', $segment_ids)->findArray();
|
||||
$deleted_segments = array();
|
||||
@@ -501,7 +501,7 @@ class Newsletter extends Model {
|
||||
if(empty($options)) {
|
||||
$this->options = array();
|
||||
} else {
|
||||
$this->options = Helpers::arrayColumn($options, 'value', 'name');
|
||||
$this->options = array_column($options, 'value', 'name');
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
@@ -532,7 +532,7 @@ class Subscriber extends Model {
|
||||
$custom_fields = CustomField::select('id')->findArray();
|
||||
if(empty($custom_fields)) return $this;
|
||||
|
||||
$custom_field_ids = Helpers::arrayColumn($custom_fields, 'id');
|
||||
$custom_field_ids = array_column($custom_fields, 'id');
|
||||
$relations = SubscriberCustomField::select('custom_field_id')
|
||||
->select('value')
|
||||
->whereIn('custom_field_id', $custom_field_ids)
|
||||
@@ -845,7 +845,7 @@ class Subscriber extends Model {
|
||||
'(' . rtrim(str_repeat('?,', count($subscribers)), ',') . ')',
|
||||
array_merge(
|
||||
Helpers::flattenArray($sql('values')),
|
||||
Helpers::arrayColumn($subscribers, $email_position)
|
||||
array_column($subscribers, $email_position)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user