add log and try catch
This commit is contained in:
parent
410ba6f6ca
commit
da8f36730c
|
|
@ -32,12 +32,19 @@ class TelegramLinkFixerExtension extends Minz_Extension
|
|||
return; // skip if not a telegram link
|
||||
}
|
||||
|
||||
$description = $entry->description();
|
||||
if (empty($description)) {
|
||||
error_log('TelegramLinkFixer: Skipping - empty description');
|
||||
return;
|
||||
try {
|
||||
// output the $entry
|
||||
error_log('TelegramLinkFixer: Entry: ' . json_encode($entry));
|
||||
$description = $entry->description();
|
||||
if (empty($description)) {
|
||||
error_log('TelegramLinkFixer: Skipping - empty description');
|
||||
return;
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
error_log('TelegramLinkFixer: Error processing entry: ' . $e->getMessage());
|
||||
}
|
||||
|
||||
|
||||
// Look specifically for Telegraph links
|
||||
error_log('TelegramLinkFixer: Looking for Telegraph link in description: ' . $description);
|
||||
try {
|
||||
|
|
|
|||
Loading…
Reference in New Issue