Title: PHP error in Mixin.php
Last modified: February 8, 2021

---

# PHP error in Mixin.php

 *  Resolved [Henk Barreveld](https://wordpress.org/support/users/henk-barreveld/)
 * (@henk-barreveld)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/two-php-errors-in-mixin-php/)
 * Hello,
 * This may not be serious, but please be aware that VS Code gives me two PHP error
   messages **$this can not be used in static methods.** for your file `\mailpoet\
   vendor-prefixed\nesbot\carbon\src\Carbon\Traits\Mixin.php`.
 * This is about the code `$context = isset($this) ? $this->cast($className) : new
   $className();` in that file.
 * Best regards,
    Henk
    -  This topic was modified 5 years, 4 months ago by [Henk Barreveld](https://wordpress.org/support/users/henk-barreveld/).

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [MailPoet](https://wordpress.org/support/users/mailpoet/)
 * (@mailpoet)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/two-php-errors-in-mixin-php/#post-14028349)
 * Hi [@henk-barreveld](https://wordpress.org/support/users/henk-barreveld/)
 * Thanks for the feedback, we’ll forward this to our developers.
 *  Plugin Author [MailPoet](https://wordpress.org/support/users/mailpoet/)
 * (@mailpoet)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/two-php-errors-in-mixin-php/#post-14030935)
 * Hi [@henk-barreveld](https://wordpress.org/support/users/henk-barreveld/),
 * Thank you for your report.
 * This is the 3rd party library nesbot/carbon. The developers of this library refactored
   this functionality three months ago, and it looks that these error warnings in
   IDE aren’t a problem.
 * Best regards

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘PHP error in Mixin.php’ is closed to new replies.

 * ![](https://ps.w.org/mailpoet/assets/icon-256x256.png?rev=3284564)
 * [MailPoet - Newsletters, Email Marketing, and Automation](https://wordpress.org/plugins/mailpoet/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/mailpoet/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/mailpoet/)
 * [Active Topics](https://wordpress.org/support/plugin/mailpoet/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/mailpoet/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/mailpoet/reviews/)

## Tags

 * [PHP errors](https://wordpress.org/support/topic-tag/php-errors/)

 * 2 replies
 * 2 participants
 * Last reply from: [MailPoet](https://wordpress.org/support/users/mailpoet/)
 * Last activity: [5 years, 3 months ago](https://wordpress.org/support/topic/two-php-errors-in-mixin-php/#post-14030935)
 * Status: resolved