aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorKevin Decherf <kevin@kdecherf.com>2020-04-04 17:11:25 +0200
committerKevin Decherf <kevin@kdecherf.com>2020-04-26 18:29:34 +0200
commit7f88c7423f0b0c8c565f7e4d4d1b37ba14e55dae (patch)
tree276185c8e82c56d782e293cfbab1b4f66baf48ef /src
parent0e8a0f77d0b643a884e6687bd9c463267852a970 (diff)
downloadwallabag-7f88c7423f0b0c8c565f7e4d4d1b37ba14e55dae.tar.gz
wallabag-7f88c7423f0b0c8c565f7e4d4d1b37ba14e55dae.tar.zst
wallabag-7f88c7423f0b0c8c565f7e4d4d1b37ba14e55dae.zip
Replace wallabag's fork of tcpdf with the original one, fix notices for PHP 7.4
Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
Diffstat (limited to 'src')
-rw-r--r--src/Wallabag/ImportBundle/Controller/PocketController.php12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/Wallabag/ImportBundle/Controller/PocketController.php b/src/Wallabag/ImportBundle/Controller/PocketController.php
index 71ceb427..f952867b 100644
--- a/src/Wallabag/ImportBundle/Controller/PocketController.php
+++ b/src/Wallabag/ImportBundle/Controller/PocketController.php
@@ -47,8 +47,12 @@ class PocketController extends Controller
47 return $this->redirect($this->generateUrl('import_pocket')); 47 return $this->redirect($this->generateUrl('import_pocket'));
48 } 48 }
49 49
50 $form = $request->request->get('form');
51
50 $this->get('session')->set('import.pocket.code', $requestToken); 52 $this->get('session')->set('import.pocket.code', $requestToken);
51 $this->get('session')->set('mark_as_read', $request->request->get('form')['mark_as_read']); 53 if (null !== $form && \array_key_exists('mark_as_read', $form)) {
54 $this->get('session')->set('mark_as_read', $form['mark_as_read']);
55 }
52 56
53 return $this->redirect( 57 return $this->redirect(
54 'https://getpocket.com/auth/authorize?request_token=' . $requestToken . '&redirect_uri=' . $this->generateUrl('import_pocket_callback', [], UrlGeneratorInterface::ABSOLUTE_URL), 58 'https://getpocket.com/auth/authorize?request_token=' . $requestToken . '&redirect_uri=' . $this->generateUrl('import_pocket_callback', [], UrlGeneratorInterface::ABSOLUTE_URL),
@@ -80,11 +84,11 @@ class PocketController extends Controller
80 if (true === $pocket->setMarkAsRead($markAsRead)->import()) { 84 if (true === $pocket->setMarkAsRead($markAsRead)->import()) {
81 $summary = $pocket->getSummary(); 85 $summary = $pocket->getSummary();
82 $message = $this->get('translator')->trans('flashes.import.notice.summary', [ 86 $message = $this->get('translator')->trans('flashes.import.notice.summary', [
83 '%imported%' => $summary['imported'], 87 '%imported%' => null !== $summary && \array_key_exists('imported', $summary) ? $summary['imported'] : 0,
84 '%skipped%' => $summary['skipped'], 88 '%skipped%' => null !== $summary && \array_key_exists('skipped', $summary) ? $summary['skipped'] : 0,
85 ]); 89 ]);
86 90
87 if (0 < $summary['queued']) { 91 if (null !== $summary && \array_key_exists('queued', $summary) && 0 < $summary['queued']) {
88 $message = $this->get('translator')->trans('flashes.import.notice.summary_with_queue', [ 92 $message = $this->get('translator')->trans('flashes.import.notice.summary_with_queue', [
89 '%queued%' => $summary['queued'], 93 '%queued%' => $summary['queued'],
90 ]); 94 ]);