Repository navigation
Commit 8b6da39
committed
Fixing a bug in sprintf would cause metabox to completely fail.
trac: https://core.trac.wordpress.org/ticket/65914
When `$button` has a structure like `%a`, a PHP parser error can cause
Pods or other similar custom metadata blocks to fail to display,
resulting in a serious problem. This often disrupts the normal
management and use of WordPress. This patch corrects this issue in a way
that has been verified to be effective!
It's worth noting that, whether we like it or not, this solution is
generated by AI combined with internet data retrieval. This solution is
very simple and therefore involves no human creativity; I must admit, it
was generated by AI.
Hopefully, it can be merged quickly to resolve the issue as much as
possible. It aims to fix the following bugs:
```
thrown in /var/www/wordpress/wp-includes/general-template.php on line
533" while reading response header from upstream, client: 10.20.245.1,
server: www.qhjack.top, request: "GET
/wp-admin/post.php?post=582&action=edit HTTP/1.0", upstream:
"fastcgi://unix:///run/php/php8.5-fpm.sock:", host: "www.qhjack.top",
referrer: "https://www.qhjack.top/wp-admin/edit.php?post_type=services"
2026/08/30 16:25:15 [error] 289643#289643: *106436 FastCGI sent in
stderr: "PHP message: PHP Fatal error: Uncaught ValueError: Unknown
format specifier "a" in
/var/www/wordpress/wp-includes/general-template.php:533
Stack trace:
#0 /var/www/wordpress/wp-includes/general-template.php(533): sprintf()
WordPress#1 /var/www/wordpress/wp-includes/general-template.php(400):
wp_get_tooltip_helper()
WordPress#2 /var/www/wordpress/wp-admin/includes/template.php(1410):
wp_get_tooltip()
WordPress#3 /var/www/wordpress/wp-admin/includes/post.php(2392): do_meta_boxes()
WordPress#4 /var/www/wordpress/wp-admin/edit-form-blocks.php(401):
the_block_editor_meta_boxes()
WordPress#5 /var/www/wordpress/wp-admin/post.php(199): require('...')
WordPress#6 {main}
```1 parent 4b2da6e commit 8b6da39
1 file changed
Lines changed: 11 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
531 | 531 | | |
532 | 532 | | |
533 | 533 | | |
534 | | - | |
535 | | - | |
536 | | - | |
537 | | - | |
538 | | - | |
539 | | - | |
540 | | - | |
541 | | - | |
542 | | - | |
543 | | - | |
544 | | - | |
545 | | - | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
546 | 545 | | |
547 | 546 | | |
548 | 547 | | |
| |||
0 commit comments