backdrop-contrib / domain

A domain-based access control system for Backdrop CMS
https://backdropcms.org/project/domain
3 stars 5 forks source link

PHP 8.1 Creating new domain causes deprecated function warning #47

Closed yorkshire-pudding closed 1 day ago

yorkshire-pudding commented 1 week ago

Steps to reproduce

  1. Enable display of all error and warning messages.
  2. Have PHP 8.1 or higher
  3. Create new domain record

Expected result Domain is saved with no error messages

Actual result Domain is saved but error message displays:

Deprecated function: strcmp(): Passing null to parameter #2 ($string2) of type string is deprecated in domain_form_validate() (line 617 of /app/docroot/modules/domain/domain.admin.inc).

sudipto68 commented 1 day ago

@yorkshire-pudding I can reproduce this issue by following the above steps and the fix that you provide also fixes the issue. After applying the fix, the error message didn't show up anymore.

stpaultim commented 1 day ago

@yorkshire-pudding I went ahead and merged this PR. @sudipto68 says it looks good and works fine.

If you were holding off for any reason, we can reverse it.

yorkshire-pudding commented 1 day ago

Thanks @stpaultim - no, wasn't waiting for any reason.