Tag Archives: ZF2

Call to a member function setPassword() on a non-object in /vendor/socalnick/scn-social-auth/src/ScnSocialAuth/Authentication/Adapter/HybridAuth.php

I was playing with ZfcUser together with ScnSocialAuth, ScnSocialAuthDoctrineORM and BjyAuthorize using a custom entity – mostly based on the User entity provided by BjyAuthorize – and ended up with the following fatal error: Fatal error: Call to a member function setPassword() on a non-object in …/vendor/socalnick/scn-social-auth/src /ScnSocialAuth/Authentication/Adapter/HybridAuth.php on line 441 This problem is caused Read the full article…

Missing `foo=bar` POST data line in Zend\Http\Request example of generating a formatted HTTP Request from a Request object

If You’re missing the foo=bar line in the output of the example Generating a formatted HTTP Request from a Request object, just add: $request->setContent($request->getPost()->toString()); right before: echo `$request->toString(); The original (not working) example (found here): use Zend\Http\Request; $request = new Request(); $request->setMethod(Request::METHOD_POST); $request->setUri(‘/foo’); $request->getHeaders()->addHeaders(array( ‘HeaderField1’ => ‘header-field-value1’, ‘HeaderField2’ => ‘header-field-value2’, )); $request->getPost()->set(‘foo’, ‘bar’); echo $request->toString(); Read the full article…

Too much content was extracted from the stream (* instead of * bytes) Zend\Http\Headers Object while trying Data Streaming with Zend\Http\Client

I was having fun with Zend\Http\Client and wanted to try Data Streaming for downloading larger files. But there was a strange problem – downloads were aborted and an exception was thrown with the message: Too much content was extracted from the stream (976 instead of 687 bytes) Zend\Http\Headers Object