Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Array to string conversion on PHP 5.6.x #6

Closed
redboxmarcins opened this issue May 27, 2016 · 3 comments
Closed

Array to string conversion on PHP 5.6.x #6

redboxmarcins opened this issue May 27, 2016 · 3 comments

Comments

@redboxmarcins
Copy link

Logger helper is causing error that array is converted to string

example:

$this->logger->debug(array($module, $message,$data),$context);

@wsagen
Copy link
Contributor

wsagen commented May 30, 2016

Hi,

Thanks for raising. Sounds like you aren't running shipperhq/module-logger. This is now a dependency for ShipperHQ, it should install automatically when using composer installation. If you can update via composer it should install the logger and error should be resolved.

Please let me know if you still see the error.

@wsagen wsagen closed this as completed May 30, 2016
@wsagen wsagen reopened this May 30, 2016
@cheelahim
Copy link

cheelahim commented Jun 6, 2016

Hey @wsagen! The shipperhq/module-logger is installed. But check ShipperHQ\Shipper\Helper\LogAssist.

   public function postDebug($module, $message, $data, array $context = array()) {
        if ($this->shipperDataHelper->getConfigValue('carriers/shipper/debug')) {
            $this->logger->debug(array($module, $message,$data),$context);
        }
    }

The way the logger is invoked does not comply with Psr/LoggerInterface. String value is expected as a first (message) argument while array is passed.
Could you please fix it and release along with #7

@wsagen
Copy link
Contributor

wsagen commented Jun 7, 2016

This is now resolved in release version 20.0.6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants