mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-05 02:24:35 +02:00
fix: php notices (#3479)
* fix(jornaln): A non well formed numeric value encountered fixes A non well formed numeric value encountered at bridges/JornalNBridge.php line 89 * fix(reuters): fix notice
This commit is contained in:
parent
0f14a0f6ee
commit
d8bc015efc
2 changed files with 14 additions and 12 deletions
|
@ -75,15 +75,16 @@ class JornalNBridge extends BridgeAbstract
|
|||
$image = $article->find('.elementor-post__thumbnail img', 0)->src;
|
||||
//Timestamp
|
||||
$date = $article->find('.elementor-post-date', 0)->plaintext;
|
||||
$date = trim($date, "\t ");
|
||||
$date = preg_replace('/ de /i', '/', $date);
|
||||
$date = preg_replace('/, /', '/', $date);
|
||||
$date = explode('/', $date);
|
||||
$year = $date[2];
|
||||
$month = $date[1];
|
||||
$day = $date[0];
|
||||
$year = (int) $date[2];
|
||||
$month = (int) $date[1];
|
||||
$day = (int) $date[0];
|
||||
foreach (self::PT_MONTH_NAMES as $key => $item) {
|
||||
if ($key === strtolower($month)) {
|
||||
$month = $item;
|
||||
$month = (int) $item;
|
||||
}
|
||||
}
|
||||
$timestamp = mktime(0, 0, 0, $month, $day, $year);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue