Comments (11)
I did some more tests and get weird results also with WP (WSOD).
What about this little change?
$value = preg_replace( '/[^0-9:.-]/', '', $value ); // Strips slashes.
$value = preg_replace( '/[^0-9:.-]/', '', $value ?? '' ); // Strips slashes.
Or we have to dig a little more?
from classicpress-v2.
If you empty the database or re-install to a fresh set of tables do you still see this issue?
In your database what is the gmt_offset
option value? ( SELECT * FROM
cp_optionsWHERE
option_name = 'gmt_offset';
) if you have a Timezone selected and if you have an offset selected?
from classicpress-v2.
gmt_offset
is correct in the option table and in the page too (I'm choosing "Rome" and not the offset).
Same after a fresh install.
from classicpress-v2.
Why you say gmt_offset
is correct in the option table - is that a number? When I set for "Rome" the got_offset
value in the table is empty. Any plugins or Timezone code in the Theme?
from classicpress-v2.
With Rome I have gmt_offset = 2
.
Tested with ClassicPress TwentySixteen
and ClassicPress TwentySeventeen
themes.
from classicpress-v2.
Well, here we seem to have a difference.
With Timezone set as Fiji, in my database I have:
With Timezone set as Rome, I have:
And with Timezone set as UTF_8, I have:
So, it seems for some reason when you set the Timezone as a place that the got_offset
value is not being cleared out. Are you using caching locally at all?
from classicpress-v2.
I was using wp-cli
to get gmt_offset
, my fault.
The value in the database is as in your, but it's filtered by wp_timezone_override_offset()
defined in src/wp-includes/functions.php
and hooked in src/wp-includes/default-filters.php
.
Hope this helps.
from classicpress-v2.
Looking here:
$value = null;
if ( isset( $_POST[ $option ] ) ) {
$value = $_POST[ $option ];
if ( ! is_array( $value ) ) {
$value = trim( $value );
}
$value = wp_unslash( $value );
}
update_option( $option, $value );
gmt_offset
is not in $_POST
, so why updating gmt_offset
to null
?
In general, why updating an option that is not required to update?
from classicpress-v2.
Found ticket for this:
https://core.trac.wordpress.org/ticket/57728
from classicpress-v2.
Good job finding the upstream ticket. They have a patch, we can monitor now to see when it is merged.
from classicpress-v2.
Fixed in #88
from classicpress-v2.
Related Issues (20)
- π ... causes problems with classic-SEO using php 8.1 ... HOT 19
- deprecation
- π Quick Edit break columns HOT 10
- π Uncaught Error: Call to undefined function unregister_block_type()
- π‘ WordPress block-related functions list HOT 5
- wp-login not accessibleπ HOT 4
- ClassicPress plugins showing update from WordPress pluginsπ HOT 4
- βΏ Accessability: Use <details> for "Add menu items" accordion sections HOT 4
- βΏ Accessibility: Better feedback when moving nav menu items HOT 4
- π‘ Add Gravatar generated robot avatars HOT 1
- Improve forms with HTML5 input types HOT 1
- π‘ Enable Client-side Comment Form Validation HOT 1
- Rebuild widgets screen (and equivalent in Customizer) to use details and summary tags HOT 5
- About screen after update still refers to CP being fork of WP 4.9 HOT 2
- ` wp doctor check core-verify-checksums` not working π HOT 2
- π‘ Add `wp_body_open` hook to included themes HOT 2
- Replace jQuery UI in CP back-end: First Step: Draggable, Droppable, Sortable HOT 2
- π Adding placeholder supports for WPDB implemented in WP 6.2+ HOT 3
- TinyMCE in Text Widget HOT 3
- π Edit Post in Visual is "blank" and mce-editor button is stacked (one under other) HOT 4
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 classicpress-v2.