NuSoap version 0.9.5 Attempt to modify property of non-object in nusoap.php

December 1st, 2012

I am working with NuSoap and a particular WSDL file was causing the following error for me:

PHP Warning: Attempts to modify property of non-object in lib/nusoap.php on line 4694.

To fix this problem I modified line 4694 in nusoap.php from:

$this->schemas[$ns]->imports[$ns2][$ii]['loaded'] = true;

To this:

$this->schemas[$ns][$ns2]->imports[$ns2][$ii]['loaded'] = true;

And that fixed the problem.  I found the solution in the NuSoap forums, but I though I would share the information as a post in the hopes it make it easier for someone else to find, and my line number was different than the one mentioned.  It looks like it is an old problem that has not been patched in the official release.