cakephp saveall Error Argument #2 is not an array -


I have a code that worked for months on my local host and development server. The two windows are the environment when it is moved to a new Linux hosting location, it throws these errors:

Warning (2): array_merge () [function.array-merge]: logic # 2 Not an array [Core / Cake / Model / Model.php, Line 2036]

Warning (2): array_merge () [function.array-merge]: Logic # 2 is not an array [Core / Cake / model / Model.php, line 2186]

The code snippet in question is one left, all the calls which saves the data obtained from a form. Interestingly, the data still saves despite error.

The code for my save is here

  if (! $ Quote ['quote'] ['total'] = = 0 = $ quotes ['quote' ] ['Total'] <0)) {If ($ -> this - & quot; Citation-> Saving All ($ quote, true)) {$ this- & gt; Session->; Set flash ('quotation delivered', 'success'); $ This- & gt; Redirect ('/ client cases / view /'. $ Case. '# Tab6'); }  

Full function:

  public function mactight () {$ this-> Load model ('applicant'); $ This- & gt; LoadModel ('ApplicantQuote'); $ This- & gt; LoadModel ('Setfee'); $ This- & gt; LoadModel ('Clientcase'); $ This- & gt; LoadModel ('Internalprice'); $ This- & gt; LoadModel ('Clientprice'); / * ------ To display clients and internal values ​​------ * / $ Internal = $ this- & gt; InternalPrice-> Search ('All'); $ Client = $ this- & gt; ClientPrice-> Search ('All'); // view_quotes page $ args = $ this- & gt; Parames ['url'] retrieves the selected applicants; // Get a case ID from the previous page $ case = $ args ['data'] ['caseid']; Remove // ​​Remove some unnecessary things from the Argus array ($ args ['data'] ['cecid']); Not set ($ args ['id']); // Applicant's applicant $ $ applicant = $ this- & gt; Applicant- & gt; Find the applicant's information from the database using 'All', array ('positions' = & gt; array ('id' = & gt; $ args] ['data']), 'order' = & gt; ; $ First_name asc ',' recursive '=> 1); $ App_id = set :: Classic extract ($ applicant,' {n} .appplicent.id '); if ($ applicant == faucet) Redirect back to view / quote page, if an applicant was selected $ $ - this- & gt; session- & gt; set Flash ('at least one applicant') was selected; $ -This-> Redirect ('/ Client cass Set-up (compact ('applicant', 'case', 'argus', 'internal', 'customer')); ($ '-' Cancel '=' $ '] ($' [Cancel '' '' quotation ''] == 'Cancel') {$ this- & Gt; Redirect ('/ client cases / view /'. $ Case);} $ quotation = $ this-> request-> data; not set ($ quote ['quotebutton']); $ quote [ Applicant "] = array (); $ bid ['applicant'] ['applicant'] = array (); $ count = 0; foreign currency ($ APIId = key => $ id) {$ quote ['applicant '] [' Away A '] [] = $ Apiaiaidi [$ count]; $ Count ++; } $ Gst = 0; If ($ quote ['quote'] ['includeGST'] == 1) {$ total = $ quote ['quotes'] ['total']; If ($ total & gt; 0) {$ gst = $ total / 10; }} $ Citation ['citation'] ['gst'] = $ gst; // debug ($ bid); Not set ($ bid ['bid'] ['includeGST']); If ($ quote ['quote'] ['total'] == 0 $ $ quote ['quote'] ['total'] <0)) {if ($ this-> Quote- & SaveAll ($ quote, true)) {$ this- & gt; Session-> Set flash ('quotation delivered', 'success'); $ This- & gt; Redirect ('/ client cases / view /'. $ Case. '# Tab6'); }} And {$ this-> Session-> Setflash ('Failed to save citation, all fields must be filled and total will be more than 0'); }}}  

Data still saves properly, but how do I change it so that these errors are dropped?

The second parameter is an array. You are sending boolean.

In your case, it seems that save ($ quote) will also work the second parameter of save is a boolean so that no error is returned.

Warnings may have been suppressed on other servers.


Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -