debug: Add result verification logging
This commit is contained in:
@@ -59,9 +59,15 @@ final class YoutubeFacadeContentFilter
|
||||
|
||||
// Return original content if regex failed
|
||||
if ($result === null) {
|
||||
file_put_contents('/tmp/yt-debug.log', date('H:i:s') . " preg_replace FAILED (null)\n", FILE_APPEND);
|
||||
return $content;
|
||||
}
|
||||
|
||||
// Debug: verify facades in result
|
||||
$facadeCount = substr_count($result, 'data-video-id');
|
||||
$iframeCount = substr_count($result, 'youtube.com/embed');
|
||||
file_put_contents('/tmp/yt-debug.log', date('H:i:s') . " RESULT: {$facadeCount} facades, {$iframeCount} iframes remaining\n", FILE_APPEND);
|
||||
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user