Fix type error for list update
[MAILPOET-4752]
This commit is contained in:
@ -66,7 +66,7 @@ class Segments {
|
|||||||
$data['description'] ?? '',
|
$data['description'] ?? '',
|
||||||
SegmentEntity::TYPE_DEFAULT,
|
SegmentEntity::TYPE_DEFAULT,
|
||||||
[],
|
[],
|
||||||
$data['id']
|
(int)$data['id']
|
||||||
);
|
);
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
throw new APIException(
|
throw new APIException(
|
||||||
|
@ -17,7 +17,6 @@ use MailPoet\Segments\SegmentsRepository;
|
|||||||
use MailPoet\Subscribers\SubscriberSegmentRepository;
|
use MailPoet\Subscribers\SubscriberSegmentRepository;
|
||||||
use MailPoet\Test\DataFactories\Form;
|
use MailPoet\Test\DataFactories\Form;
|
||||||
use MailPoet\Test\DataFactories\Newsletter;
|
use MailPoet\Test\DataFactories\Newsletter;
|
||||||
use MailPoet\Test\DataFactories\NewsletterOption;
|
|
||||||
use MailPoet\Test\DataFactories\Segment as SegmentFactory;
|
use MailPoet\Test\DataFactories\Segment as SegmentFactory;
|
||||||
use MailPoet\Test\DataFactories\Subscriber;
|
use MailPoet\Test\DataFactories\Subscriber;
|
||||||
|
|
||||||
@ -159,7 +158,7 @@ class SegmentsTest extends \MailPoetTest {
|
|||||||
);
|
);
|
||||||
|
|
||||||
$data = [
|
$data = [
|
||||||
'id' => $segment->getId(),
|
'id' => (string)$segment->getId(),
|
||||||
'name' => 'new name',
|
'name' => 'new name',
|
||||||
'description' => 'updated description',
|
'description' => 'updated description',
|
||||||
];
|
];
|
||||||
|
Reference in New Issue
Block a user