Comments (4)
I can't reproduce this.
from smf.
I wouldn't even suspect a corrupted $modSettings, as that should still render the !empty check false.
from smf.
It's just kinda dumb, I think...
Yes, it checks empty on 382, but nowhere prior, e.g., 372 & 374.
I think this is happening when folks are restoring Unix backups, with this enabled, into wamps, where (I think) elsewhere in load.php it deletes the settings because it knows they don't apply.
I think we just need another check on 370.
from smf.
This looks like a simple logic problem to me. Lines 382 and 386 both have this:
if (!empty($modSettings['load_average']) || $modSettings['load_average'] === 0.0)
If $modSettings['load_average'] is not set, the first check will fail, and then the second check will produce the error.
The solution should be simple. Since the existing logic is meant to check that $modSettings['load_average'] either isn't empty or else is empty only because it is zero, we can just do this:
if (isset($modSettings['load_average']))
If it's really important that the value be a float rather than, say, an integer, just cast it to a float on the next line after this check.
from smf.
Related Issues (20)
- [3.0]: Cannot assign null to property SMF\Config::$auth_secret of type string HOT 9
- [2.1.4]: 2: Undefined array key "code" HOT 6
- [3.0]: Blank values in Server Settings admin page
- [2.1 & 3.0]: Email 7-bit format is not checking for 1000 byte limits HOT 6
- [2.1 & 3.0]: Doc block at top of Minify.php is duplicated HOT 1
- [3.0]: Upgrader: Uncaught TypeError: Cannot assign int to property HOT 1
- [3.0]: Upgrader: Upgrade from 2.1 somehow starts installer
- [3.0]: Config quirks HOT 9
- [2.1]: Trailing slash in new theme path should be removed
- [2.1] & [3.0]: BBC - hr within table breaks table
- [3.0]: Database Error: Unknown column 'b.member_groups' in 'field list' HOT 1
- [2.1]: Multiple cron.php errors: Trying to access array offset on null; database value you're trying to insert does not exist; given array of integer values is empty HOT 3
- [2.1] & [3.0]: Wrong alert message upon user activation
- [3.0]: New user signup WSOD - Uncaught TypeError: Cannot access offset of type SMF\IP on array
- [3.0] & [2.1]: php 8.3 - Blank screen viewing source in error log code popup window
- [2.1] & [3.0]: Html special chars in custom profile fields result in erroneous error
- [2.1]: Smileys at end of PMs cause 'No Direct Access' Error
- [2.1] & [3.0]: BBC img tag quirk: width scales if specified, but height does not in mobile view HOT 1
- [2.1] & [3.0]: Long multi-byte words dropped in log_search_words
- [2.1]: fetch_web_data() - sockets fails, cURL not attempted
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from smf.