Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cast attr to string to prevent a PHP deprecation warning in 8.1 #365

Open
wants to merge 1 commit into
base: lib
Choose a base branch
from

Conversation

beryllium
Copy link
Contributor

I received this Deprecation notice when running unit tests for sculpin under PHP 8.1:

PHP Deprecated:  preg_match_all():
  Passing null to parameter #2 ($subject) of type string is deprecated
  in sculpin/vendor/michelf/php-markdown/Michelf/MarkdownExtra.php
  on line 252

I solved it in the leanest way possible, which was to cast $attr to string. Let me know if you would prefer a different solution.

And thanks for building this library! I've been quite happy with it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant