- πΊπΈUnited States euk
It is rather weird and confusing.
Why not set a default to one value, and then override it withif () {...}
?
When applying the "Mask" or "Watermark" effect with PHP 8.1 the following warning message is displayed:
Mask error:
Deprecated function: round(): Passing null to parameter #1 ($num) of type int|float is deprecated in Drupal\system\Plugin\ImageToolkit\Operation\gd\Resize->validateArguments() (line 37 of core/modules/system/src/Plugin/ImageToolkit/Operation/gd/Resize.php).
Drupal\system\Plugin\ImageToolkit\Operation\gd\Resize->validateArguments(Array) (Line: 171)
Drupal\Core\ImageToolkit\ImageToolkitOperationBase->apply(Array) (Line: 124)
Drupal\Core\ImageToolkit\ImageToolkitBase->apply('resize', Array) (Line: 142)
Drupal\Core\Image\Image->apply('resize', Array) (Line: 33)
Drupal\image_effects\Plugin\ImageToolkit\Operation\gd\Mask->execute(Array) (Line: 172)
Drupal\Core\ImageToolkit\ImageToolkitOperationBase->apply(Array) (Line: 124)
Drupal\Core\ImageToolkit\ImageToolkitBase->apply('mask', Array) (Line: 142)
Drupal\Core\Image\Image->apply('mask', Array) (Line: 224)
Drupal\image_effects\Plugin\ImageEffect\MaskImageEffect->applyEffect(Object) (Line: 329)
Drupal\image\Entity\ImageStyle->createDerivative('core/modules/image/sample.png', 'public://styles/texto_destacado/public/core/modules/image/sample.png') (Line: 58)
template_preprocess_image_style_preview(Array, 'image_style_preview', Array)
...
Watermark error:
Deprecated function: round(): Passing null to parameter #1 ($num) of type int|float is deprecated in Drupal\system\Plugin\ImageToolkit\Operation\gd\Resize->validateArguments() (line 37 of core/modules/system/src/Plugin/ImageToolkit/Operation/gd/Resize.php).
Drupal\system\Plugin\ImageToolkit\Operation\gd\Resize->validateArguments(Array) (Line: 171)
Drupal\Core\ImageToolkit\ImageToolkitOperationBase->apply(Array) (Line: 124)
Drupal\Core\ImageToolkit\ImageToolkitBase->apply('resize', Array) (Line: 142)
Drupal\Core\Image\Image->apply('resize', Array) (Line: 32)
Drupal\image_effects\Plugin\ImageToolkit\Operation\gd\Watermark->execute(Array) (Line: 172)
Drupal\Core\ImageToolkit\ImageToolkitOperationBase->apply(Array) (Line: 124)
Drupal\Core\ImageToolkit\ImageToolkitBase->apply('watermark', Array) (Line: 142)
Drupal\Core\Image\Image->apply('watermark', Array) (Line: 237)
Drupal\image_effects\Plugin\ImageEffect\WatermarkImageEffect->applyEffect(Object) (Line: 329)
Drupal\image\Entity\ImageStyle->createDerivative('core/modules/image/sample.png', 'public://styles/texto_destacado/public/core/modules/image/sample.png') (Line: 58)
template_preprocess_image_style_preview(Array, 'image_style_preview', Array)
...
Add a "Mask" or "Watermark" effect to an image style.
Looking for suggestions on the best way to solve this problem.
None.
None.
None.
None.
Needs review
3.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
It is rather weird and confusing.
Why not set a default to one value, and then override it with if () {...}
?