Fixed
Project:
Signature Field
Version:
3.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
12 Apr 2024 at 20:13 UTC
Updated:
2 Nov 2026 at 08:41 UTC
Jump to comment: Most recent
When need change color for pen or pad this error apear in create new node.
Drupal
10.2.4
Deprecated function: Invalid characters passed for attempted conversion, these have been ignored in _signature_field_color_unpack() (line 59 of modules/contrib/signature_field/signature_field.module).
If no custom color, no has any errors.
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #4
mukeshaddweb commentedComment #5
gokulg commentedTested MR !11 on Drupal 11.4.6 with PHP 8.4.24
Before patch:
- Invalid or partially valid color values were passed directly to _signature_field_color_unpack()
- This resulted in PHP deprecation warnings from hexdec() due to invalid characters
After applying the patch:
- Input is properly validated using regex (only #RGB / #RRGGBB allowed)
- Invalid values are rejected at form level
- _signature_field_color_unpack() safely returns NULL for invalid input
- Widget handles NULL values safely and avoids processing invalid data
Result:
- No deprecation warnings
- Input validation prevents incorrect values
- Code is now robust and consistent
RTBC.
Comment #8
udhaya kumar commentedComment #9
udhaya kumar commentedComment #13
udhaya kumar commentedComment #14
gokulg commentedI see that the changes have been merged into the '3.x-dev' branch. I'm currently reviewing and testing the merged implementation and will update this issue with the QA results once validation is complete.
Comment #15
gokulg commentedI tested the latest changes from the '3.x-dev' branch.
Testing environments:
Testing performed:
The functionality worked as expected in both Drupal 10.2.4 and Drupal 11.4.11 environments.