- Open in Jenkins โ Open on Drupal.org โCore: 10.1.x + Environment: PHP 8.1 & MySQL 5.7 updated depslast update
about 1 year ago 1 pass - Status changed to Needs work
about 1 year ago 7:51am 25 October 2023 - ๐ฎ๐นItaly apaderno Brescia, ๐ฎ๐น
+ if ($path_alias != null) { + $path_alias = mb_strtolower($alias_manager->getAliasByPath($path)); + }
As per Drupal coding standards, it is
NULL
, notnull
. Furthermore, instead of comparing the value directly withNULL
, it is better to useempty()
oris_null()
. - ๐ฎ๐ณIndia Gautam_105@
Gautam_105@ โ made their first commit to this issueโs fork.
- Open in Jenkins โ Open on Drupal.org โCore: 10.1.x + Environment: PHP 8.1 & MySQL 5.7 updated depslast update
about 1 year ago 1 pass - @gautam_105 opened merge request.
- Status changed to Needs review
about 1 year ago 8:05am 25 October 2023 - ๐ฎ๐ณIndia Gautam_105@
@apaderno ,
i have fixed this issue and created MR for the same. Please review this MR - Status changed to Needs work
about 1 year ago 8:19am 25 October 2023 - Issue was unassigned.
- Open in Jenkins โ Open on Drupal.org โCore: 10.1.x + Environment: PHP 8.1 & MySQL 5.7 updated depslast update
about 1 year ago 1 pass - Status changed to Needs review
about 1 year ago 11:37am 25 October 2023 - ๐ฎ๐ณIndia Gautam_105@
@apaderno,
i have udated my MR review my changes. - Status changed to Active
10 months ago 9:12pm 6 March 2024 - ๐บ๐ธUnited States solotandem
This module is relying on the API of the path_alias module which says
AliasManagerInterface::getAliasByPath()
returns string. If you are getting a NULL then I would suggest you find out why and fix that. What you are suggesting is that module A can not rely on the published API of module B but is required to type check every value returned from a method in module B? - ๐บ๐ธUnited States inversed
I wanted to add that I'm seeing this problem with version 2.0.6 as well. The patch does not apply on that version but that's not unexpected.
- ๐ฎ๐นItaly apaderno Brescia, ๐ฎ๐น
The documentation for
AliasManagerInterface::getAliasByPath()
is pretty clear on what that method returns: An alias that represents the path, or path if no alias was found.Either the class implementing
AliasManagerInterface
returns the wrong value, or it returns NULL because that is the parameter the method gets. - ๐ฎ๐นItaly apaderno Brescia, ๐ฎ๐น
AliasManager::getAliasByPath()
returns the correct value, though.