Skip to content

Commit

Permalink
Fixed the last errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivan Grginov committed Dec 4, 2020
1 parent a2d5526 commit ea2e230
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
9 changes: 8 additions & 1 deletion phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,11 @@ parameters:
checkMissingIterableValueType: false
treatPhpDocTypesAsCertain: false
paths:
- src/
- src/
ignoreErrors:
-
message: '~^Access to an undefined property MailchimpMarketing\\ApiClient~'
path: src/integrations/mailchimp/class-mailchimp.php
-
message: '~^Function apply_filters invoked with [0-9] parameters~'
path: src/routes/class-buckaroo-response-handler-route.php
5 changes: 5 additions & 0 deletions src/routes/class-mailchimp-fetch-segments-route.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,11 @@ private function extract_tags_and_segments( $response ): array {
'tags' => [],
'segments' => [],
];

if ( ! isset( $response->segments ) ) {
return $tags_segments;
}

foreach ( $response->segments as $segment ) {
switch ( $segment->type ) {
case 'static':
Expand Down

0 comments on commit ea2e230

Please sign in to comment.