Notice: ob_end_flush(): failed to delete and flush buffer. No buffer to delete or flush inの対応

概要説明

Noticeなので特に対応はしなくても問題はないのですが気になるという方のためのカスタマイズ。ob_end_flush()を使用する際には対象となるデータの存在確認を行うことでNotice表示の対応が行なえます。

削除・フラッシュするバッファがないことが原因

// 対象となるデータがあるかを判定してから使用
if( ob_get_length() ){
    ob_end_flush();
}

ログの確認について

関連機能

  1. WordPress+Cocoon 「値の型が正しくありません」「解析不能な構造化データエラー」とGoogle Search Consoleで言われたので対応してみた

  2. XAMPP+phpMyAdmin 「Fatal error: Maximum execution time of 300 seconds」タイムアウトの対応

  3. Deprecated: Automatic conversion of false to array is deprecated inの対応

サイドバー

よく使うカスタマイズ

最近の記事

アニメの名言集

Profile

PAGE TOP