Open slim16165 opened 12 months ago
IMPORTANT: I managed to resolve the bug, and here's the patch in git format for version 1.0.203. However, I'm primarily not a PHP developer, so I would greatly appreciate if you could review my solution. solve issue.zip
Here solve:
Find : 405 or 406 line and change with this
$auto_submission_log = get_option( 'giapi_auto_submissions', [] );
if ( ! $is_manual && is_array( $auto_submission_log ) ) {
// We keep the auto-submitted URLs in a log to prevent duplicates.
$logs = array_values( array_reverse( $auto_submission_log ) );
if ( ! empty( $logs[0] ) && $logs[0]['url'] === $url_input[0] && time() - $logs[0]['time'] < self::THROTTLE_LIMIT ) {
return false;
}
}
Describe the bug I'm encountering two critical errors when attempting to save a post in WordPress using the Rank Math plugin. These errors prevent the post from being saved and cause a crash.
To Reproduce
Expected behavior After making edits to the post, I expect the post to save successfully without any errors.
Additional details on server
Additional context Here are the detailed errors:
Error related to
array_reverse()
:Error related to "rankingKeywords":
IMPORTANT: I managed to resolve the bug, and here's the patch in git format for version 1.0.203. However, I'm primarily not a PHP developer, so I would greatly appreciate if you could review my solution. solve issue.zip
This is a small part of the dump of the log history: string(16356) "a:100:{i:0;a:5:{s:3:"url";s:32:"https://gossipchi.it/ariete/202/";s:6:"status";i:200;s:17:"manual_submission";b:0;s:7:"message";s:2:"OK";s:4:"time";i:1695884902;}i:1;a:5:{s:3:"url";s:45:"https://gossipchi.it/colapesce-dimartino/210/";s:6:"status";i:200;s:17:"manual_submission";b:0;s:7:"message";s:2:"OK";s:4:"time";i:1695884945;}i:2;a:5:{s:3:"url";s:35:"https://gossipchi.it/colla-zio/213/";s:6:"status";i:200;s:17:"manual_submission";b:0;s:7:"message";s:2:"OK";s:4:"time";i:1695884961;}i:3;a:5:{s:3:"url";s:42:"https://gossipchi.it/gianluca-grignani/48/";s:6:"status";i:200;s:17:"manual_submission";b:0;s:7:"message";s:2:"OK";s:4:"time";i:1695885005;}i:4;a:5:{s:3:"url";s:42:"https://gossipchi.it/elodie-di-patrizi/42/";s:6:"status";i:200;s:17:"manual_submission";b:0;s:7:"message";s:2:"OK";s:4:"time";i:1695885029;}i:5;a:5:{s:3:"url";s:28:"https://gossipchi.it/lda/96/";s:6:"status";i:200;s:17:"manual_submission";b:0;s:7:"message";s:2:"OK";s:4:"time";i:1695885051;}i:6;a:5:{s:3:"url";s:37:"https://gossipchi.it/sanremo-2023/39/";s:6:"status";i:200;s:17:"manual_submission";b:0;s:7:"message";s:2:"OK";s:4:"time";i:1695885080;}i:7;a:5:{s:3:"url";s:45:"https://gossipchi.it/i-cugini-di-campagna/57/";s:6:"status";i:200;s:17:"manual_submission";b:0;s:7:"message";s:2:"OK";s:4:"time";i:1695885121;}i:8;a:5:{s:3:"url";s:43:"https://gossipchi.it/silvana-giacobini/303/";s:6:"status";i:200;s:17:"manual_submission";b:0;s:7:"message";s:2:"OK";s:4:"time";i:1695885145;}i:9;a:5:{s:3:"url";s:41:"https://gossipchi.it/dorothea-wierer/300/";s:6:"status";i:200;s:17:"manual_submission";b:0;s:7:"message";s:2:"OK";s:4:"time";i:1695885168;}i:10;a:5:{s:3:"url";s:38:"https://gossipchi.it/anna-favella/297/";s:6:"status";i:200;s:17:"manual_submission";b:0;s:7:"message";s:2:"OK";s:4:"time";i:1695885191;}i:11;a:5:{s:3:"url";s:41:"https://gossipchi.it/ana-quiles-boix/291/";s:6:"status";i:200;s:17:"manual_submission";b:0;s:7:"message";s:2:"OK";s:4:"time";i:1695885734;}i:12;a:5:{s:3:"url";s:39:"https://gossipchi.it/jason-