A non-numeric value encountered

Created on 8 June 2020, over 4 years ago
Updated 16 June 2023, over 1 year ago

Since my upgrade from PHP 7.0 to 7.3 I see this

A non-numeric value encountered video.module:299

My patch addresses this by adding two type casts for the variables.

🐛 Bug report
Status

Needs work

Version

2.0

Component

Code

Created by

Live updates comments and jobs are added and updated live.
  • PHP 7.3

    The issue particularly affects sites running on PHP version 7.3.0 or later.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇸🇰Slovakia poker10

    Thanks for reporting this and providing a patch.

    Can you please confirm what are the values of these two variables (variable_get('video_transcode_timeout') and variable_get('video_ffmpeg_instances')) when you get that warning?

    I understand that when you use the admin form on admin/config/media/video/scheduling and change the values, then these variables will be strings, but it is not causing any warnings/error on my PHP 8.1 testing enviroment. Only error I can get is when one of these variables is set to the empty string.

    If that is the case, then I propose to change the patch and add '#required' => TRUE to each variable settings input field in video_scheduling_admin_settings(). These fields are currently protected via '#element_validate' => array('element_validate_integer_positive'), but this validator will allow an empty string.

Production build 0.71.5 2024