Skip to content

Commit

Permalink
Fix some outdated signature
Browse files Browse the repository at this point in the history
  • Loading branch information
rchavik committed Oct 30, 2020
1 parent ab8568b commit e36149e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions FileManager/src/Controller/Admin/AttachmentsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace Croogo\FileManager\Controller\Admin;

use Cake\Event\Event;
use Cake\Http\Response;
use Cake\Http\Exception\NotFoundException;
use Cake\Log\Log;
use Cake\Utility\Hash;
use Croogo\Core\Croogo;
Expand Down Expand Up @@ -240,8 +240,8 @@ public function add()
if ($attachment) {
$this->Flash->success(__d('croogo', 'The Attachment has been saved'));
$url = [];
if (isset($saved->asset->asset_usage[0])) {
$usage = $saved->asset->asset_usage[0];
if (isset($attachment->asset->asset_usage[0])) {
$usage = $attachment->asset->asset_usage[0];
if (!empty($usage->model) && !empty($usage->foreign_key)) {
$url['?']['model'] = $usage->model;
$url['?']['foreign_key'] = $usage->foreign_key;
Expand Down Expand Up @@ -272,7 +272,7 @@ public function add()
* @return \Cake\Http\Response|void
* @access public
*/
public function edit($id = null)
public function edit($id)
{
$this->set('title_for_layout', __d('croogo', 'Edit Attachment'));

Expand Down Expand Up @@ -321,7 +321,7 @@ public function edit($id = null)
* @return \Cake\Http\Response|void
* @access public
*/
public function delete($id = null)
public function delete($id)
{
if (!$id) {
$this->Flash->error(__d('croogo', 'Invalid id for Attachment'));
Expand Down

0 comments on commit e36149e

Please sign in to comment.