]> git.immae.eu Git - github/shaarli/Shaarli.git/blobdiff - application/front/controller/admin/ManageShaareController.php
Fix a bug preventing to edit bookmark with ID #0
[github/shaarli/Shaarli.git] / application / front / controller / admin / ManageShaareController.php
index ffb0dae430ca69ec2929b14a323add0f554d562e..59ba2de9547b3abf09ee55f0880d489b35f2c1cf 100644 (file)
@@ -127,7 +127,7 @@ class ManageShaareController extends ShaarliAdminController
         $this->checkToken($request);
 
         // lf_id should only be present if the link exists.
-        $id = $request->getParam('lf_id') ? intval(escape($request->getParam('lf_id'))) : null;
+        $id = $request->getParam('lf_id') !== null ? intval(escape($request->getParam('lf_id'))) : null;
         if (null !== $id && true === $this->container->bookmarkService->exists($id)) {
             // Edit
             $bookmark = $this->container->bookmarkService->get($id);