[support] Error when updating custom code to d7

Mutuku Ndeti jnmutuku at gmail.com
Wed Mar 28 15:46:48 UTC 2012


below is the code snippet giving me the error. It works in d6 but not in d7.

if( ! isset($allSuppliers[$supplierId]->products) )
 {
  $allSuppliers[$supplierId]->products = array();
 }
 $allSuppliers[$supplierId]->products[] = $product;

On 25/03/2012, Awtar Singh <asingh at quantum-coders.com> wrote:
> Mutuka -
>
> Can you paste the backtrace response?
>
> Regards,
>
> Awtar singh
> Executive Director
> Quantum Coders LLC
>
> www.quantum-coders.com
>
> Sent from my iPhone
>
> On Mar 25, 2012, at 6:39 AM, Mutuku Ndeti <jnmutuku at gmail.com> wrote:
>
>> I have a rule where I am executing custom code. It works well  in d6.
>> I have changed most of the api to d7.
>>
>> doing a debug_backtrace, just give displays back my code(no indication
>> where the error is).
>>
>>
>>
>> On 24/03/2012, Ms. Nancy Wichmann <nan_wich at bellsouth.net> wrote:
>>> This is usually when you have included PHP code and it has an error in
>>> it.
>>>
>>>
>>> Nancy
>>> Injustice anywhere is a threat to justice everywhere. -- Dr. Martin L.
>>> King,
>>> Jr.
>>>
>>>
>>>
>>>> ________________________________
>>>> From: Mutuku Ndeti
>>>>
>>>> Warning: Attempt to assign property of non-object in eval() (line 32
>>>> of /sites/all/modules/rules/modules/php.eval.inc(146) : eval()'d
>>>> code).
>>>>
>>
>>
>> --
>> Tel:254- 722-490994
>> www.agile.co.ke | www.jipambe.com
>> --
>> [ Drupal support list | http://lists.drupal.org/ ]
> --
> [ Drupal support list | http://lists.drupal.org/ ]
>


-- 
Tel:254- 722-490994
www.agile.co.ke | www.jipambe.com


More information about the support mailing list