I'm getting a notice when I save the settings mail form. and When I show the block as well

Notice: A non well formed numeric value encountered in Drupal\apsis_mail\Apsis->cachableRequest() (line 204 of modules/contrib/apsis_mail/src/Apsis.php).

Comments

jjcarrion created an issue. See original summary.

jjcarrion’s picture

Assigned: jjcarrion » Unassigned
Status: Needs work » Needs review
StatusFileSize
new720 bytes

Here is the patch, the options were in the other way around.

xen’s picture

Thanks! Committed.

xen’s picture

Status: Needs review » Fixed

  • Xen committed 33d3eff on 8.x-2.x authored by jjcarrion
    Issue #3134174 by jjcarrion: Notice because of malformed value
    

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

arnested’s picture

We need to handle existing config where the config is the wrong way around.

Committed in https://git.drupalcode.org/project/apsis_mail/commit/2bee363 and released in 8.x-2.0-beta4.

arnested’s picture

In 2bee363d5fc66566d53d929c615f2073046e695b I made sure the configured cache lifetime must be an integer (using is_int()).

Unfortunately the form submits a string even if the value was an integer and that git stored in the config system as string.

This change:

  • converts the submitted value to an integer before storing it in the config system
  • ensures the configured value is a numeric instead of an integer before converting it to integer and using it
  • updates already stored numeric strings to integers in the config system

Committed in https://git.drupalcode.org/project/apsis_mail/commit/abfccff and released in 8.x-2.0-beta5.