Reputation: 1
I have installed Drupal commerce on Druapl 8 site. I need to expose commerce features via an API. when I try to enable Commerce API module I am getting following error.
TypeError: strpos() expects parameter 1 to be string, int given in strpos() (line 33 of /var/www/html/web/modules/contrib/commerce_api/src/ParamConverter/EntityUuidConverter.php)
Upvotes: 0
Views: 17
Reputation: 1
I have updated modules/contrib/commerce_api/src/ParamConverter/EntityUuidConverter.php
file as follows.
$name
to strval($name)
public function applies($definition, $name, Route $route) {
return strpos(strval($name), 'commerce_') === 0;
}
Commerce API got enabled.
Upvotes: 0