Merhaba arkadaşlar codeigniter kodlama öğrenmeye başladım. Görsel upload ederken ;



Böyle hata almaktayım. Controller kodları ektedir.

public function logoayarlari($id)
{
    if(!empty($_FILES["logo"]["name"]))
    {
        $logo_data = $this->default_model->get("settings",array("id"=>$id));

        unlink("uploads/".$logo_data->logo);

        $config["upload_path"]   = "uploads/logofavicon/";
        $config["allowed_types"] = "gif|jpg|jpeg|png|svg";
        $config["file_name"]     = uniqid();

        $this->load->library("upload",$config);
        $upload = $this->upload->do_upload("logo");

        if($upload)
        {
            $uploaded_filename = $this->upload->data("file_name");

            $config["image_library"]   = "gd2";
            $config["source_image"]    =  "uploads/logofavicon/".$uploaded_filename;
            $config["create_thumb"]    = FALSE;
            $config["maintain_ratio"]  = TRUE;
            $config["quality"]         ="100%";
            $config["witdh"]  = 250;
            $config["height"] = 100;

            $this->load->library("image_lib",$config);
            $this->image_lib->resize();

            $update = $this->default_model->update("settings",array("id"=>$id),array("logo"=>"logofavicon/".$uploaded_filename));

            if($update)
            {
                $alert = array(
                    'title'    => "Tebrikler!",
                    'subtitle' => "İşlem başarılı bir şekilde gerçekleşti!",
                    'type'     => "success"
                );

            }else{
                $alert = array(
                    'title'    => "Hata!",
                    'subtitle' => "İşlem başarısız oldu.Tekrar deneyin!",
                    'type'     => "error"
                );
            }
            $this->session->set_flashdata("alert",$alert);
            redirect(base_url("settings"));

        }else{

            $alert = array(
                'title'    => "Hata!",
                'subtitle' => "Logo yüklenirken işlem başarısız oldu.Tekrar deneyin!",
                'type'     => "error"
            );

            $this->session->set_flashdata("alert",$alert);
            redirect(base_url("settings"));

        }


    }else{

        $alert = array(
            'title'    => "Hata!",
            'subtitle' => "Logo alanı boş olamaz.Tekrar deneyin!",
            'type'     => "error"
        );

        $this->session->set_flashdata("alert",$alert);
        redirect(base_url("settings"));

    }