View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
1771 | RackTables | default | public | 2017-06-13 09:08 | 2017-09-26 11:13 |
Reporter | stianfp | Assigned To | infrastation | ||
Priority | high | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | 0.20.13 | ||||
Target Version | 0.21.0 | Fixed in Version | 0.21.0 | ||
Summary | 1771: PHP Warning: A non-numeric value encountered in functions.php on line 5357 | ||||
Description | PHP version: PHP 7.1.6 (cli) (built: Jun 7 2017 12:15:54) ( NTS ) OS version: Red Hat Enterprise Linux Server release 7.3 (Maipo) Racktables outputs this error with every step you take on the website. See this for info: http://php.net/manual/en/migration71.other-changes.php | ||||
Steps To Reproduce | Install racktables with the versions provided. | ||||
Tags | No tags attached. | ||||
Regarding the warning, the code in question is:function loadConfigDefaults() { $ret = loadConfigCache(); if (!count ($ret)) throw new RackTablesError ('Failed to load configuration from the database.', RackTablesError::INTERNAL); foreach ($ret as $varname => &$row) { $row['is_altered'] = 'no'; if ($row['vartype'] == 'uint') $row['varvalue'] = 0 + $row['varvalue']; This used to cast the value to an integer. Regarding PHP 7.1, on Ubuntu 17.04 it is available as an option (7.0 is the default). |
|
I have tried Ubuntu 17.04 in a virtual machine and it does not have a PHP 7.1 option despite what Ubuntu web-site implies. To fix this bug there should be a way to reproduce it first. | |
https://launchpad.net/~ondrej/+archive/ubuntu/php/+index?batch=75&memo=225&start=225 sudo apt-get install -y python-software-properties sudo add-apt-repository -y ppa:ondrej/php sudo apt-get update -y apt-cache pkgnames | grep php7.1 |
|
Thank you, let me try once again later. | |
I could reproduce this issue using Fedora 26, which comes with PHP 7.1 by default. There is no quick and simple solution to this particular problem, it requires some careful re-engineering. | |
From now on this issue is also visible in the Travis CI build of RackTables, which now includes a job with PHP 7.1 (which currently fails). | |
The master branch now has the PHP warning in that particular function resolved and Travis CI job for PHP 7.1 currently passes. But I have found that it is not a complete solution to the problem, there is at least one more place in the code that requires a fix so this bug remains open. | |
After some testing I had found that the remaining test failures on Fedora 26 were due to MariaDB, not PHP 7.1 (those are now fixed as well). Hence I consider this bug resolved, RackTables 0.21.0 will support PHP 7.1. Thank you for the report and feedback! | |
Date Modified | Username | Field | Change |
---|---|---|---|
2017-06-13 09:08 | stianfp | New Issue | |
2017-06-13 09:08 | stianfp | Tag Attached: PHP Warning: A non-numeric value encountered in functions.php | |
2017-06-16 11:05 | infrastation | Tag Detached: PHP Warning: A non-numeric value encountered in functions.php | |
2017-06-16 11:14 | infrastation | Note Added: 0003625 | |
2017-06-16 11:44 | infrastation | Note Added: 0003629 | |
2017-06-16 12:04 | stianfp | Note Added: 0003631 | |
2017-06-16 13:53 | infrastation | Note Added: 0003633 | |
2017-07-24 16:43 | infrastation | Status | new => acknowledged |
2017-07-24 16:43 | infrastation | Target Version | => 0.21.0 |
2017-07-24 16:43 | infrastation | Note Added: 0003649 | |
2017-08-03 13:24 | infrastation | Note Added: 0003661 | |
2017-08-29 16:38 | infrastation | Note Added: 0003685 | |
2017-09-04 19:12 | infrastation | Status | acknowledged => closed |
2017-09-04 19:12 | infrastation | Resolution | open => fixed |
2017-09-04 19:12 | infrastation | Fixed in Version | => 0.21.0 |
2017-09-04 19:12 | infrastation | Note Added: 0003687 | |
2017-09-26 11:13 | infrastation | Assigned To | => infrastation |