fix: PHP 8.3 TypeError in articles-list total count (int cast)
number_format() in PHP 8.3 strictly requires int|float; $wpdb->get_var() returns string|null. Cast $total to (int) at point of assignment in admin/partials/articles-list.php to fix HTTP 500 on Articles admin page. Also add PHPUnit test covering the string->int cast contract. Fixes #31. Version bump 2.5.0 -> 2.5.1. Agent-Session: fix-articles-500-20260617
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
* Plugin Name: Peptide News Aggregator
|
||||
* Plugin URI: https://github.com/peptiderepo/peptide-news-plugin
|
||||
* Description: Aggregates and displays the latest peptide research news from multiple sources with click analytics and trend reporting.
|
||||
* Version: 2.5.0
|
||||
* Version: 2.5.1
|
||||
* Author: peptiderepo
|
||||
* Author URI: https://github.com/peptiderepo
|
||||
* License: GPL-2.0+
|
||||
@@ -24,7 +24,7 @@ if ( ! defined( 'WPINC' ) ) {
|
||||
/**
|
||||
* Current plugin version — follows SemVer.
|
||||
*/
|
||||
define( 'PEPTIDE_NEWS_VERSION', '2.5.0' );
|
||||
define( 'PEPTIDE_NEWS_VERSION', '2.5.1' );
|
||||
define( 'PEPTIDE_NEWS_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
|
||||
define( 'PEPTIDE_NEWS_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
|
||||
define( 'PEPTIDE_NEWS_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
|
||||
|
||||
Reference in New Issue
Block a user