upd: ajaxcontroller
fix couple typos
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
namespace App\Controller;
|
||||
|
||||
use DateTime;
|
||||
|
||||
use Exception;
|
||||
use Parsedown;
|
||||
use App\Entity\Reference;
|
||||
use App\Entity\Template;
|
||||
@@ -16,7 +16,6 @@ use App\Entity\SharedNote;
|
||||
use App\Utils\Utils;
|
||||
use Doctrine\DBAL\Exception\ReadOnlyException;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Exception;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
@@ -299,11 +298,11 @@ class AjaxController extends AbstractController
|
||||
$newNote = false;
|
||||
if (isset($data->id) && $data->id) {
|
||||
/** @var Note|array $note */
|
||||
$note = $emi->getRepository(Note::class)->findBy(['id' => $data->id, 'user' => $this->getUser()]);
|
||||
$dbnote = $emi->getRepository(Note::class)->findBy(['id' => $data->id, 'user' => $this->getUser()]);
|
||||
|
||||
if (is_array($note) && count($note) > 0) {
|
||||
if (is_array($dbnote) && count($dbnote) > 0) {
|
||||
/** @var Note $note */
|
||||
$note = $note[0];
|
||||
$note = $dbnote[0];
|
||||
} else {
|
||||
$note = new Note();
|
||||
$newNote = true;
|
||||
|
||||
Reference in New Issue
Block a user