Comments (8)
Was checking this out today and was immediately hit by a screen fulls of errors. After managing to get to settings they went away, so probably the same bug.
from c9-admin.
Looks like it, yes.
from c9-admin.
I pushed an update today that I believe addresses this, but I’m having a hard time getting it to error out
I have an issue with the admin bar setting still that I’m going to work out this weekend.
Take a look
from c9-admin.
From my recollection of things, this issue appears only on new installations and that commit doesn't fix it. The default return value for get_option() is false
, so the line would still be evaluated as isset(<bool>['suppress_update_notice'])
. I would honestly mirror get_option functionality in a class function like so:
function c9_get_option($name) {
$opt = get_option($this->plugin_name);
return (((false !== $opt) && array_key_exists($name, $opt)) ? $opt[$name] : false);
}
At that point you could disregard most of the conditionals within your code, and instances like
c9-admin/admin/class-c9-admin.php
Line 57 in f9a5f03
if (c9_get_option('suppress_update_notice'))
Also, since mirroring the get_option behaviour, this works even if the return value is not simply true
but a complex dataset.
Note: I wrote the code off the top of my head, and while it should work some test might be in order :D
from c9-admin.
from c9-admin.
Both these solutions fix the errors except for the first, line 41.
If you could change that line in your pull request to the following all errors are gone on my end.
if (!$this->c9_option('custom_skin')) {
But now I notice the settings page has more of the same errors in c9-admin-display.php.
from c9-admin.
oops, that line eluded me, thanks for reporting.
from c9-admin.
from c9-admin.
Related Issues (1)
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 c9-admin.