Compile error in theme after updating to 2.1.8Error log after updating magento 1.8 to 1.9SSL error when updating extensionsmagento 2 setup compile errorMagento 2 brokes after compile commandMagento 1 compile vs Magento 2 compileMagento 2: Error updating to 2.1.8 and 2.1.92.2 theme compilation errorError during compilation after upgrade in magento 2.2.3Unable to Compile in magento2After updating to Magento 2.2.6, the following error is output

Can a creature tell when it has been affected by a Divination wizard's Portent?

If Earth is tilted, why is Polaris always above the same spot?

gnu parallel how to use with ffmpeg

Help, my Death Star suffers from Kessler syndrome!

Asahi Dry Black beer can

Transfer over $10k

TikZ how to make supply and demand arrows for nodes?

Packing rectangles: Does rotation ever help?

When did stoichiometry begin to be taught in U.S. high schools?

How to back up a running remote server?

Is thermodynamics only applicable to systems in equilibrium?

Why do Ichisongas hate elephants and hippos?

Phrase for the opposite of "foolproof"

Cannot populate data in lightning data table

What does "rf" mean in "rfkill"?

Why does Bran Stark feel that Jon Snow "needs to know" about his lineage?

Options leqno, reqno for documentclass or exist another option?

Historically, were women trained for obligatory wars? Or did they serve some other military function?

Single Colour Mastermind Problem

Did Henry V’s archers at Agincourt fight with no pants / breeches on because of dysentery?

Illegal assignment from SObject to Contact

Are Boeing 737-800’s grounded?

Pressure to defend the relevance of one's area of mathematics

How to set the font color of quantity objects (Version 11.3 vs version 12)?



Compile error in theme after updating to 2.1.8


Error log after updating magento 1.8 to 1.9SSL error when updating extensionsmagento 2 setup compile errorMagento 2 brokes after compile commandMagento 1 compile vs Magento 2 compileMagento 2: Error updating to 2.1.8 and 2.1.92.2 theme compilation errorError during compilation after upgrade in magento 2.2.3Unable to Compile in magento2After updating to Magento 2.2.6, the following error is output






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















I have just updated from 2.1.7 to 2.1.8 but when I run:



php bin/magento setup:di:compile


I get an erroe which is:



 [Exception]
Warning: Declaration of PlazathemesOverrideControllerAdminhtmlCategorySave::imagePreprocessing($data) should be compatible with MagentoCatalogControllerAdminhtmlCategorySave::imagePreprocessing(array $data) in /home/rbadmin/public_html/app/code/Plazathemes/Override/Controller/Adminhtml/Category/Save.php on line 82


The contents of Save.php are below



<?php
/**
* Copyright © 2016 Magento. All rights reserved.
* See COPYING.txt for license details.
*/
namespace PlazathemesOverrideControllerAdminhtmlCategory;

class Save extends MagentoCatalogControllerAdminhtmlCategorySave

private $storeManager;

/**
* Filter category data
*
* @param array $rawData
* @return array
*/
protected function _filterCategoryPostData(array $rawData)

$data = $rawData;
// @todo It is a workaround to prevent saving this data in category model and it has to be refactored in future
if (isset($data['image']) && is_array($data['image']))
if (!empty($data['image']['delete']))
$data['image'] = null;
else
if (isset($data['image'][0]['name']) && isset($data['image'][0]['tmp_name']))
$data['image'] = $data['image'][0]['name'];
else
unset($data['image']);




if (isset($data['thumb_nail']) && is_array($data['thumb_nail']))
if (!empty($data['thumb_nail']['delete']))
$data['thumb_nail'] = null;
else
if (isset($data['thumb_nail'][0]['name']) && isset($data['thumb_nail'][0]['tmp_name']))
$data['thumb_nail'] = $data['thumb_nail'][0]['name'];
else
unset($data['thumb_nail']);




if (isset($data['thumb_popular']) && is_array($data['thumb_popular']))
if (!empty($data['thumb_popular']['delete']))
$data['thumb_popular'] = null;
else
if (isset($data['thumb_popular'][0]['name']) && isset($data['thumb_popular'][0]['tmp_name']))
$data['thumb_popular'] = $data['thumb_popular'][0]['name'];
else
unset($data['thumb_popular']);




return $data;


/**
* Image data preprocessing
*
* @param array $data
*
* @return array
*/
public function imagePreprocessing($data)

if (empty($data['image']))
unset($data['image']);
$data['image']['delete'] = true;


if (empty($data['thumb_nail']))
unset($data['thumb_nail']);
$data['thumb_nail']['delete'] = true;


return $data;











share|improve this question






























    0















    I have just updated from 2.1.7 to 2.1.8 but when I run:



    php bin/magento setup:di:compile


    I get an erroe which is:



     [Exception]
    Warning: Declaration of PlazathemesOverrideControllerAdminhtmlCategorySave::imagePreprocessing($data) should be compatible with MagentoCatalogControllerAdminhtmlCategorySave::imagePreprocessing(array $data) in /home/rbadmin/public_html/app/code/Plazathemes/Override/Controller/Adminhtml/Category/Save.php on line 82


    The contents of Save.php are below



    <?php
    /**
    * Copyright © 2016 Magento. All rights reserved.
    * See COPYING.txt for license details.
    */
    namespace PlazathemesOverrideControllerAdminhtmlCategory;

    class Save extends MagentoCatalogControllerAdminhtmlCategorySave

    private $storeManager;

    /**
    * Filter category data
    *
    * @param array $rawData
    * @return array
    */
    protected function _filterCategoryPostData(array $rawData)

    $data = $rawData;
    // @todo It is a workaround to prevent saving this data in category model and it has to be refactored in future
    if (isset($data['image']) && is_array($data['image']))
    if (!empty($data['image']['delete']))
    $data['image'] = null;
    else
    if (isset($data['image'][0]['name']) && isset($data['image'][0]['tmp_name']))
    $data['image'] = $data['image'][0]['name'];
    else
    unset($data['image']);




    if (isset($data['thumb_nail']) && is_array($data['thumb_nail']))
    if (!empty($data['thumb_nail']['delete']))
    $data['thumb_nail'] = null;
    else
    if (isset($data['thumb_nail'][0]['name']) && isset($data['thumb_nail'][0]['tmp_name']))
    $data['thumb_nail'] = $data['thumb_nail'][0]['name'];
    else
    unset($data['thumb_nail']);




    if (isset($data['thumb_popular']) && is_array($data['thumb_popular']))
    if (!empty($data['thumb_popular']['delete']))
    $data['thumb_popular'] = null;
    else
    if (isset($data['thumb_popular'][0]['name']) && isset($data['thumb_popular'][0]['tmp_name']))
    $data['thumb_popular'] = $data['thumb_popular'][0]['name'];
    else
    unset($data['thumb_popular']);




    return $data;


    /**
    * Image data preprocessing
    *
    * @param array $data
    *
    * @return array
    */
    public function imagePreprocessing($data)

    if (empty($data['image']))
    unset($data['image']);
    $data['image']['delete'] = true;


    if (empty($data['thumb_nail']))
    unset($data['thumb_nail']);
    $data['thumb_nail']['delete'] = true;


    return $data;











    share|improve this question


























      0












      0








      0








      I have just updated from 2.1.7 to 2.1.8 but when I run:



      php bin/magento setup:di:compile


      I get an erroe which is:



       [Exception]
      Warning: Declaration of PlazathemesOverrideControllerAdminhtmlCategorySave::imagePreprocessing($data) should be compatible with MagentoCatalogControllerAdminhtmlCategorySave::imagePreprocessing(array $data) in /home/rbadmin/public_html/app/code/Plazathemes/Override/Controller/Adminhtml/Category/Save.php on line 82


      The contents of Save.php are below



      <?php
      /**
      * Copyright © 2016 Magento. All rights reserved.
      * See COPYING.txt for license details.
      */
      namespace PlazathemesOverrideControllerAdminhtmlCategory;

      class Save extends MagentoCatalogControllerAdminhtmlCategorySave

      private $storeManager;

      /**
      * Filter category data
      *
      * @param array $rawData
      * @return array
      */
      protected function _filterCategoryPostData(array $rawData)

      $data = $rawData;
      // @todo It is a workaround to prevent saving this data in category model and it has to be refactored in future
      if (isset($data['image']) && is_array($data['image']))
      if (!empty($data['image']['delete']))
      $data['image'] = null;
      else
      if (isset($data['image'][0]['name']) && isset($data['image'][0]['tmp_name']))
      $data['image'] = $data['image'][0]['name'];
      else
      unset($data['image']);




      if (isset($data['thumb_nail']) && is_array($data['thumb_nail']))
      if (!empty($data['thumb_nail']['delete']))
      $data['thumb_nail'] = null;
      else
      if (isset($data['thumb_nail'][0]['name']) && isset($data['thumb_nail'][0]['tmp_name']))
      $data['thumb_nail'] = $data['thumb_nail'][0]['name'];
      else
      unset($data['thumb_nail']);




      if (isset($data['thumb_popular']) && is_array($data['thumb_popular']))
      if (!empty($data['thumb_popular']['delete']))
      $data['thumb_popular'] = null;
      else
      if (isset($data['thumb_popular'][0]['name']) && isset($data['thumb_popular'][0]['tmp_name']))
      $data['thumb_popular'] = $data['thumb_popular'][0]['name'];
      else
      unset($data['thumb_popular']);




      return $data;


      /**
      * Image data preprocessing
      *
      * @param array $data
      *
      * @return array
      */
      public function imagePreprocessing($data)

      if (empty($data['image']))
      unset($data['image']);
      $data['image']['delete'] = true;


      if (empty($data['thumb_nail']))
      unset($data['thumb_nail']);
      $data['thumb_nail']['delete'] = true;


      return $data;











      share|improve this question
















      I have just updated from 2.1.7 to 2.1.8 but when I run:



      php bin/magento setup:di:compile


      I get an erroe which is:



       [Exception]
      Warning: Declaration of PlazathemesOverrideControllerAdminhtmlCategorySave::imagePreprocessing($data) should be compatible with MagentoCatalogControllerAdminhtmlCategorySave::imagePreprocessing(array $data) in /home/rbadmin/public_html/app/code/Plazathemes/Override/Controller/Adminhtml/Category/Save.php on line 82


      The contents of Save.php are below



      <?php
      /**
      * Copyright © 2016 Magento. All rights reserved.
      * See COPYING.txt for license details.
      */
      namespace PlazathemesOverrideControllerAdminhtmlCategory;

      class Save extends MagentoCatalogControllerAdminhtmlCategorySave

      private $storeManager;

      /**
      * Filter category data
      *
      * @param array $rawData
      * @return array
      */
      protected function _filterCategoryPostData(array $rawData)

      $data = $rawData;
      // @todo It is a workaround to prevent saving this data in category model and it has to be refactored in future
      if (isset($data['image']) && is_array($data['image']))
      if (!empty($data['image']['delete']))
      $data['image'] = null;
      else
      if (isset($data['image'][0]['name']) && isset($data['image'][0]['tmp_name']))
      $data['image'] = $data['image'][0]['name'];
      else
      unset($data['image']);




      if (isset($data['thumb_nail']) && is_array($data['thumb_nail']))
      if (!empty($data['thumb_nail']['delete']))
      $data['thumb_nail'] = null;
      else
      if (isset($data['thumb_nail'][0]['name']) && isset($data['thumb_nail'][0]['tmp_name']))
      $data['thumb_nail'] = $data['thumb_nail'][0]['name'];
      else
      unset($data['thumb_nail']);




      if (isset($data['thumb_popular']) && is_array($data['thumb_popular']))
      if (!empty($data['thumb_popular']['delete']))
      $data['thumb_popular'] = null;
      else
      if (isset($data['thumb_popular'][0]['name']) && isset($data['thumb_popular'][0]['tmp_name']))
      $data['thumb_popular'] = $data['thumb_popular'][0]['name'];
      else
      unset($data['thumb_popular']);




      return $data;


      /**
      * Image data preprocessing
      *
      * @param array $data
      *
      * @return array
      */
      public function imagePreprocessing($data)

      if (empty($data['image']))
      unset($data['image']);
      $data['image']['delete'] = true;


      if (empty($data['thumb_nail']))
      unset($data['thumb_nail']);
      $data['thumb_nail']['delete'] = true;


      return $data;








      error upgrade compilation






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited May 22 '18 at 5:12









      Teja Bhagavan Kollepara

      2,99242050




      2,99242050










      asked Aug 31 '17 at 16:01









      HadlowJHadlowJ

      64




      64




















          2 Answers
          2






          active

          oldest

          votes


















          3














          I think if you change public function imagePreprocessing($data) to public function imagePreprocessing(array $data) it won't give you the error. There could be more wrong with the theme though.






          share|improve this answer























          • That fixed it and now compiled without errors, thank you :)

            – HadlowJ
            Aug 31 '17 at 20:07


















          0














          Please change public function imagePreprocessing($data) to public function imagePreprocessing(array $data).
          it solved my error, I hope your also.






          share|improve this answer








          New contributor




          Jagan Mohan Bishoyi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
          Check out our Code of Conduct.




















            Your Answer








            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "479"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: false,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            imageUploader:
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            ,
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













            draft saved

            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f191480%2fcompile-error-in-theme-after-updating-to-2-1-8%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            3














            I think if you change public function imagePreprocessing($data) to public function imagePreprocessing(array $data) it won't give you the error. There could be more wrong with the theme though.






            share|improve this answer























            • That fixed it and now compiled without errors, thank you :)

              – HadlowJ
              Aug 31 '17 at 20:07















            3














            I think if you change public function imagePreprocessing($data) to public function imagePreprocessing(array $data) it won't give you the error. There could be more wrong with the theme though.






            share|improve this answer























            • That fixed it and now compiled without errors, thank you :)

              – HadlowJ
              Aug 31 '17 at 20:07













            3












            3








            3







            I think if you change public function imagePreprocessing($data) to public function imagePreprocessing(array $data) it won't give you the error. There could be more wrong with the theme though.






            share|improve this answer













            I think if you change public function imagePreprocessing($data) to public function imagePreprocessing(array $data) it won't give you the error. There could be more wrong with the theme though.







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Aug 31 '17 at 17:50









            jamiljamil

            600426




            600426












            • That fixed it and now compiled without errors, thank you :)

              – HadlowJ
              Aug 31 '17 at 20:07

















            • That fixed it and now compiled without errors, thank you :)

              – HadlowJ
              Aug 31 '17 at 20:07
















            That fixed it and now compiled without errors, thank you :)

            – HadlowJ
            Aug 31 '17 at 20:07





            That fixed it and now compiled without errors, thank you :)

            – HadlowJ
            Aug 31 '17 at 20:07













            0














            Please change public function imagePreprocessing($data) to public function imagePreprocessing(array $data).
            it solved my error, I hope your also.






            share|improve this answer








            New contributor




            Jagan Mohan Bishoyi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
            Check out our Code of Conduct.
























              0














              Please change public function imagePreprocessing($data) to public function imagePreprocessing(array $data).
              it solved my error, I hope your also.






              share|improve this answer








              New contributor




              Jagan Mohan Bishoyi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
              Check out our Code of Conduct.






















                0












                0








                0







                Please change public function imagePreprocessing($data) to public function imagePreprocessing(array $data).
                it solved my error, I hope your also.






                share|improve this answer








                New contributor




                Jagan Mohan Bishoyi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.










                Please change public function imagePreprocessing($data) to public function imagePreprocessing(array $data).
                it solved my error, I hope your also.







                share|improve this answer








                New contributor




                Jagan Mohan Bishoyi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.









                share|improve this answer



                share|improve this answer






                New contributor




                Jagan Mohan Bishoyi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.









                answered Apr 25 at 12:43









                Jagan Mohan BishoyiJagan Mohan Bishoyi

                1




                1




                New contributor




                Jagan Mohan Bishoyi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.





                New contributor





                Jagan Mohan Bishoyi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.






                Jagan Mohan Bishoyi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.



























                    draft saved

                    draft discarded
















































                    Thanks for contributing an answer to Magento Stack Exchange!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid


                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.

                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f191480%2fcompile-error-in-theme-after-updating-to-2-1-8%23new-answer', 'question_page');

                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Get product attribute by attribute group code in magento 2get product attribute by product attribute group in magento 2Magento 2 Log Bundle Product Data in List Page?How to get all product attribute of a attribute group of Default attribute set?Magento 2.1 Create a filter in the product grid by new attributeMagento 2 : Get Product Attribute values By GroupMagento 2 How to get all existing values for one attributeMagento 2 get custom attribute of a single product inside a pluginMagento 2.3 How to get all the Multi Source Inventory (MSI) locations collection in custom module?Magento2: how to develop rest API to get new productsGet product attribute by attribute group code ( [attribute_group_code] ) in magento 2

                    Category:9 (number) SubcategoriesMedia in category "9 (number)"Navigation menuUpload mediaGND ID: 4485639-8Library of Congress authority ID: sh85091979ReasonatorScholiaStatistics

                    Magento 2.3: How do i solve this, Not registered handle, on custom form?How can i rewrite TierPrice Block in Magento2magento 2 captcha not rendering if I override layout xmlmain.CRITICAL: Plugin class doesn't existMagento 2 : Problem while adding custom button order view page?Magento 2.2.5: Overriding Admin Controller sales/orderMagento 2.2.5: Add, Update and Delete existing products Custom OptionsMagento 2.3 : File Upload issue in UI Component FormMagento2 Not registered handleHow to configured Form Builder Js in my custom magento 2.3.0 module?Magento 2.3. How to create image upload field in an admin form