backdrop-contrib / domain

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

Warnings if enable module using bee without specifying base-url #26

Open yorkshire-pudding opened 1 month ago

yorkshire-pudding commented 1 month ago

Steps to reproduce

  1. Start with uninstalled module
  2. Enter bee en domain

Expected result Enables without warnings but without setting the domain.

Actual result ⚠️ Warning: Trying to access array offset on value of type bool in domain_default() (line 1191 of /app/docroot/modules/domain/domain.module).

📝 Deprecated function: preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in domain_machine_name() (line 3870 of /app/docroot/modules/domain/domain.module).

✔ The 'Domain Access' module was enabled.

Note this can be easily avoided by adding the base-url option. For example: bee en domain --base-url=https://example.com

However, we still should handle the error gracefully.

izmeez commented 1 week ago

I wonder if this is resolved with the fix in #39 and the PR #46 that is in the beta release?

yorkshire-pudding commented 1 week ago

Hi @izmeez . Tested again after fully uninstalling and then re-enabling and still get the same error. I'll take a look soon, but not urgent.