Skip to content
Snippets Groups Projects
Commit 47c1a6ea authored by Kristof De Jaeger's avatar Kristof De Jaeger
Browse files

Issue #3387318 by YazanMajadba: [PHP8.1] Deprecated function: str_replace():...

Issue #3387318 by YazanMajadba: [PHP8.1] Deprecated function: str_replace(): Passing null to parameter #3 ($subject) of type array|string
parent 52ac265a
No related branches found
No related tags found
No related merge requests found
Pipeline #67920 failed
......@@ -63,7 +63,7 @@ abstract class Date extends DsFieldBase {
*/
public function build() {
$field = $this->getFieldConfiguration();
$date_format = str_replace('ds_post_date_', '', $field['formatter']);
$date_format = str_replace('ds_post_date_', '', $field['formatter'] ?? '');
$render_key = $this->getRenderKey();
return [
......@@ -80,7 +80,7 @@ abstract class Date extends DsFieldBase {
$date_formatters = [];
foreach ($date_types as $machine_name => $entity) {
/* @var $entity \Drupal\Core\Datetime\DateFormatInterface */
/** @var \Drupal\Core\Datetime\DateFormatInterface $entity */
if ($entity->isLocked()) {
continue;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment