“Zend_Json Decoding failed: syntax error” when submitting order
I recently switched from Apache/PHP 5.5 to a new nginx/PHP 7.0.4 server and now I am getting once in a while a "Decoding failed: Syntax error" when customers try to checkout, apparently when they click the submit order button.
I am unable to reproduce the bug on my side, it happens in about 1 of 50 orders, sometimes also in the customer panel, so it seems to affect only logged users or SSL connections. As I am unable to reproduce the behaviour, I don't know what is happening on the frontend, but customers seem to be able to click the button again, because in most cases the order gets through after 2 error messages. The store is currently running Magento 1.9.2.1 and the server Centos7.
I know that the error is generated in Json.php in the function "decode".
Does anyone have an idea what could cause this and how to debug this? One way would be to log all JSONS with an error and then look at the syntax, but maybe someone already has a solution?
Here is an excerpt of the trace:
#0 /usr/share/nginx/html/app/code/core/Mage/Core/Helper/Data.php(659): Zend_Json::decode('', 1)
#1 /usr/share/nginx/html/app/code/core/Mage/Persistent/Model/Session.php(133): Mage_Core_Helper_Data->jsonDecode(NULL)
#2 /usr/share/nginx/html/app/code/core/Mage/Core/Model/Abstract.php(226): Mage_Persistent_Model_Session->_afterLoad()
#3 /usr/share/nginx/html/app/code/core/Mage/Persistent/Model/Session.php(154): Mage_Core_Model_Abstract->load('deleted', 'key')
#4 /usr/share/nginx/html/app/code/core/Mage/Persistent/Helper/Session.php(67): Mage_Persistent_Model_Session->loadByCookieKey()
#5 /usr/share/nginx/html/app/code/core/Mage/Persistent/Helper/Session.php(91): Mage_Persistent_Helper_Session->getSession()
#6 /usr/share/nginx/html/app/code/core/Mage/Persistent/Model/Observer.php(177): Mage_Persistent_Helper_Session->isPersistent()
#7 /usr/share/nginx/html/app/code/core/Mage/Core/Model/App.php(1357): Mage_Persistent_Model_Observer->emulateQuote(Object(Varien_Event_Observer))
#8 /usr/share/nginx/html/app/code/core/Mage/Core/Model/App.php(1336): Mage_Core_Model_App->_callObserverMethod(Object(Mage_Persistent_Model_Observer), 'emulateQuote', Object(Varien_Event_Observer))
#9 /usr/share/nginx/html/app/Mage.php(448): Mage_Core_Model_App->dispatchEvent('controller_acti...', Array)
#10 /usr/share/nginx/html/app/code/core/Mage/Core/Controller/Varien/Action.php(527): Mage::dispatchEvent('controller_acti...', Array)
#11 /usr/share/nginx/html/app/code/core/Mage/Core/Controller/Front/Action.php(69): Mage_Core_Controller_Varien_Action->preDispatch()
magento-1.9 checkout error php-7 json
add a comment |
I recently switched from Apache/PHP 5.5 to a new nginx/PHP 7.0.4 server and now I am getting once in a while a "Decoding failed: Syntax error" when customers try to checkout, apparently when they click the submit order button.
I am unable to reproduce the bug on my side, it happens in about 1 of 50 orders, sometimes also in the customer panel, so it seems to affect only logged users or SSL connections. As I am unable to reproduce the behaviour, I don't know what is happening on the frontend, but customers seem to be able to click the button again, because in most cases the order gets through after 2 error messages. The store is currently running Magento 1.9.2.1 and the server Centos7.
I know that the error is generated in Json.php in the function "decode".
Does anyone have an idea what could cause this and how to debug this? One way would be to log all JSONS with an error and then look at the syntax, but maybe someone already has a solution?
Here is an excerpt of the trace:
#0 /usr/share/nginx/html/app/code/core/Mage/Core/Helper/Data.php(659): Zend_Json::decode('', 1)
#1 /usr/share/nginx/html/app/code/core/Mage/Persistent/Model/Session.php(133): Mage_Core_Helper_Data->jsonDecode(NULL)
#2 /usr/share/nginx/html/app/code/core/Mage/Core/Model/Abstract.php(226): Mage_Persistent_Model_Session->_afterLoad()
#3 /usr/share/nginx/html/app/code/core/Mage/Persistent/Model/Session.php(154): Mage_Core_Model_Abstract->load('deleted', 'key')
#4 /usr/share/nginx/html/app/code/core/Mage/Persistent/Helper/Session.php(67): Mage_Persistent_Model_Session->loadByCookieKey()
#5 /usr/share/nginx/html/app/code/core/Mage/Persistent/Helper/Session.php(91): Mage_Persistent_Helper_Session->getSession()
#6 /usr/share/nginx/html/app/code/core/Mage/Persistent/Model/Observer.php(177): Mage_Persistent_Helper_Session->isPersistent()
#7 /usr/share/nginx/html/app/code/core/Mage/Core/Model/App.php(1357): Mage_Persistent_Model_Observer->emulateQuote(Object(Varien_Event_Observer))
#8 /usr/share/nginx/html/app/code/core/Mage/Core/Model/App.php(1336): Mage_Core_Model_App->_callObserverMethod(Object(Mage_Persistent_Model_Observer), 'emulateQuote', Object(Varien_Event_Observer))
#9 /usr/share/nginx/html/app/Mage.php(448): Mage_Core_Model_App->dispatchEvent('controller_acti...', Array)
#10 /usr/share/nginx/html/app/code/core/Mage/Core/Controller/Varien/Action.php(527): Mage::dispatchEvent('controller_acti...', Array)
#11 /usr/share/nginx/html/app/code/core/Mage/Core/Controller/Front/Action.php(69): Mage_Core_Controller_Varien_Action->preDispatch()
magento-1.9 checkout error php-7 json
I am trying to hunt down the same bug right now: It is happening du to the fact that in Mage_Persistent_Model_Session in _beforeSave() $this->getData() is empty so $info is empty and decoding fails.
– Michael Leiss
Apr 7 '16 at 9:58
1
@MichaelLeiss A user on stackoverflow pointed me into the right direction: PHP 7 throws an exception when trying to decode an empty string, this was not the case in PHP 5.X. A possible solution would be to pass "{}" instead of "".
– Socrates
Apr 7 '16 at 13:35
add a comment |
I recently switched from Apache/PHP 5.5 to a new nginx/PHP 7.0.4 server and now I am getting once in a while a "Decoding failed: Syntax error" when customers try to checkout, apparently when they click the submit order button.
I am unable to reproduce the bug on my side, it happens in about 1 of 50 orders, sometimes also in the customer panel, so it seems to affect only logged users or SSL connections. As I am unable to reproduce the behaviour, I don't know what is happening on the frontend, but customers seem to be able to click the button again, because in most cases the order gets through after 2 error messages. The store is currently running Magento 1.9.2.1 and the server Centos7.
I know that the error is generated in Json.php in the function "decode".
Does anyone have an idea what could cause this and how to debug this? One way would be to log all JSONS with an error and then look at the syntax, but maybe someone already has a solution?
Here is an excerpt of the trace:
#0 /usr/share/nginx/html/app/code/core/Mage/Core/Helper/Data.php(659): Zend_Json::decode('', 1)
#1 /usr/share/nginx/html/app/code/core/Mage/Persistent/Model/Session.php(133): Mage_Core_Helper_Data->jsonDecode(NULL)
#2 /usr/share/nginx/html/app/code/core/Mage/Core/Model/Abstract.php(226): Mage_Persistent_Model_Session->_afterLoad()
#3 /usr/share/nginx/html/app/code/core/Mage/Persistent/Model/Session.php(154): Mage_Core_Model_Abstract->load('deleted', 'key')
#4 /usr/share/nginx/html/app/code/core/Mage/Persistent/Helper/Session.php(67): Mage_Persistent_Model_Session->loadByCookieKey()
#5 /usr/share/nginx/html/app/code/core/Mage/Persistent/Helper/Session.php(91): Mage_Persistent_Helper_Session->getSession()
#6 /usr/share/nginx/html/app/code/core/Mage/Persistent/Model/Observer.php(177): Mage_Persistent_Helper_Session->isPersistent()
#7 /usr/share/nginx/html/app/code/core/Mage/Core/Model/App.php(1357): Mage_Persistent_Model_Observer->emulateQuote(Object(Varien_Event_Observer))
#8 /usr/share/nginx/html/app/code/core/Mage/Core/Model/App.php(1336): Mage_Core_Model_App->_callObserverMethod(Object(Mage_Persistent_Model_Observer), 'emulateQuote', Object(Varien_Event_Observer))
#9 /usr/share/nginx/html/app/Mage.php(448): Mage_Core_Model_App->dispatchEvent('controller_acti...', Array)
#10 /usr/share/nginx/html/app/code/core/Mage/Core/Controller/Varien/Action.php(527): Mage::dispatchEvent('controller_acti...', Array)
#11 /usr/share/nginx/html/app/code/core/Mage/Core/Controller/Front/Action.php(69): Mage_Core_Controller_Varien_Action->preDispatch()
magento-1.9 checkout error php-7 json
I recently switched from Apache/PHP 5.5 to a new nginx/PHP 7.0.4 server and now I am getting once in a while a "Decoding failed: Syntax error" when customers try to checkout, apparently when they click the submit order button.
I am unable to reproduce the bug on my side, it happens in about 1 of 50 orders, sometimes also in the customer panel, so it seems to affect only logged users or SSL connections. As I am unable to reproduce the behaviour, I don't know what is happening on the frontend, but customers seem to be able to click the button again, because in most cases the order gets through after 2 error messages. The store is currently running Magento 1.9.2.1 and the server Centos7.
I know that the error is generated in Json.php in the function "decode".
Does anyone have an idea what could cause this and how to debug this? One way would be to log all JSONS with an error and then look at the syntax, but maybe someone already has a solution?
Here is an excerpt of the trace:
#0 /usr/share/nginx/html/app/code/core/Mage/Core/Helper/Data.php(659): Zend_Json::decode('', 1)
#1 /usr/share/nginx/html/app/code/core/Mage/Persistent/Model/Session.php(133): Mage_Core_Helper_Data->jsonDecode(NULL)
#2 /usr/share/nginx/html/app/code/core/Mage/Core/Model/Abstract.php(226): Mage_Persistent_Model_Session->_afterLoad()
#3 /usr/share/nginx/html/app/code/core/Mage/Persistent/Model/Session.php(154): Mage_Core_Model_Abstract->load('deleted', 'key')
#4 /usr/share/nginx/html/app/code/core/Mage/Persistent/Helper/Session.php(67): Mage_Persistent_Model_Session->loadByCookieKey()
#5 /usr/share/nginx/html/app/code/core/Mage/Persistent/Helper/Session.php(91): Mage_Persistent_Helper_Session->getSession()
#6 /usr/share/nginx/html/app/code/core/Mage/Persistent/Model/Observer.php(177): Mage_Persistent_Helper_Session->isPersistent()
#7 /usr/share/nginx/html/app/code/core/Mage/Core/Model/App.php(1357): Mage_Persistent_Model_Observer->emulateQuote(Object(Varien_Event_Observer))
#8 /usr/share/nginx/html/app/code/core/Mage/Core/Model/App.php(1336): Mage_Core_Model_App->_callObserverMethod(Object(Mage_Persistent_Model_Observer), 'emulateQuote', Object(Varien_Event_Observer))
#9 /usr/share/nginx/html/app/Mage.php(448): Mage_Core_Model_App->dispatchEvent('controller_acti...', Array)
#10 /usr/share/nginx/html/app/code/core/Mage/Core/Controller/Varien/Action.php(527): Mage::dispatchEvent('controller_acti...', Array)
#11 /usr/share/nginx/html/app/code/core/Mage/Core/Controller/Front/Action.php(69): Mage_Core_Controller_Varien_Action->preDispatch()
magento-1.9 checkout error php-7 json
magento-1.9 checkout error php-7 json
edited Oct 18 '17 at 15:40
sv3n
9,64062352
9,64062352
asked Apr 1 '16 at 17:28
Socrates
115211
115211
I am trying to hunt down the same bug right now: It is happening du to the fact that in Mage_Persistent_Model_Session in _beforeSave() $this->getData() is empty so $info is empty and decoding fails.
– Michael Leiss
Apr 7 '16 at 9:58
1
@MichaelLeiss A user on stackoverflow pointed me into the right direction: PHP 7 throws an exception when trying to decode an empty string, this was not the case in PHP 5.X. A possible solution would be to pass "{}" instead of "".
– Socrates
Apr 7 '16 at 13:35
add a comment |
I am trying to hunt down the same bug right now: It is happening du to the fact that in Mage_Persistent_Model_Session in _beforeSave() $this->getData() is empty so $info is empty and decoding fails.
– Michael Leiss
Apr 7 '16 at 9:58
1
@MichaelLeiss A user on stackoverflow pointed me into the right direction: PHP 7 throws an exception when trying to decode an empty string, this was not the case in PHP 5.X. A possible solution would be to pass "{}" instead of "".
– Socrates
Apr 7 '16 at 13:35
I am trying to hunt down the same bug right now: It is happening du to the fact that in Mage_Persistent_Model_Session in _beforeSave() $this->getData() is empty so $info is empty and decoding fails.
– Michael Leiss
Apr 7 '16 at 9:58
I am trying to hunt down the same bug right now: It is happening du to the fact that in Mage_Persistent_Model_Session in _beforeSave() $this->getData() is empty so $info is empty and decoding fails.
– Michael Leiss
Apr 7 '16 at 9:58
1
1
@MichaelLeiss A user on stackoverflow pointed me into the right direction: PHP 7 throws an exception when trying to decode an empty string, this was not the case in PHP 5.X. A possible solution would be to pass "{}" instead of "".
– Socrates
Apr 7 '16 at 13:35
@MichaelLeiss A user on stackoverflow pointed me into the right direction: PHP 7 throws an exception when trying to decode an empty string, this was not the case in PHP 5.X. A possible solution would be to pass "{}" instead of "".
– Socrates
Apr 7 '16 at 13:35
add a comment |
3 Answers
3
active
oldest
votes
Update: This has been resolved in Inchoo's Magento PHP 7 compatibility module: https://github.com/Inchoo/Inchoo_PHP7
github.com/Inchoo/Inchoo_PHP7/issues/29
– sv3n
Oct 18 '17 at 15:46
add a comment |
app/code/core/Mage/Core/Helper/Data.php
return Zend_Json::decode($encodedValue, $objectDecodeType);
replace
if(!empty($encodedValue)){
return Zend_Json::decode($encodedValue, $objectDecodeType);
} else {
return Zend_Json::decode('{}', $objectDecodeType);
}
Worked for me thank you...!!! I was not able to save inventories config changes.
– Ankur Loriya
Jul 13 '18 at 14:16
add a comment |
Please try below code
appcodecoreMageCoreHelperData.php line number 657
replace
public function jsonDecode($encodedValue, $objectDecodeType = Zend_Json::TYPE_ARRAY)
{
return Zend_Json::decode($encodedValue, $objectDecodeType);
}
with
public function jsonDecode($encodedValue, $objectDecodeType = Zend_Json::TYPE_ARRAY)
{
if (empty($encodedValue) || $encodedValue == NULL ) {
return Zend_Json::decode('{}', $objectDecodeType);
} else {
return Zend_Json::decode($encodedValue, $objectDecodeType);
}
}
I got the same issue while Persistent Shopping Cart enabled from admin. I fixed issue using above code
– Nimesh Patel
yesterday
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "479"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f109069%2fzend-json-decoding-failed-syntax-error-when-submitting-order%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
Update: This has been resolved in Inchoo's Magento PHP 7 compatibility module: https://github.com/Inchoo/Inchoo_PHP7
github.com/Inchoo/Inchoo_PHP7/issues/29
– sv3n
Oct 18 '17 at 15:46
add a comment |
Update: This has been resolved in Inchoo's Magento PHP 7 compatibility module: https://github.com/Inchoo/Inchoo_PHP7
github.com/Inchoo/Inchoo_PHP7/issues/29
– sv3n
Oct 18 '17 at 15:46
add a comment |
Update: This has been resolved in Inchoo's Magento PHP 7 compatibility module: https://github.com/Inchoo/Inchoo_PHP7
Update: This has been resolved in Inchoo's Magento PHP 7 compatibility module: https://github.com/Inchoo/Inchoo_PHP7
answered Apr 22 '16 at 12:39
Socrates
115211
115211
github.com/Inchoo/Inchoo_PHP7/issues/29
– sv3n
Oct 18 '17 at 15:46
add a comment |
github.com/Inchoo/Inchoo_PHP7/issues/29
– sv3n
Oct 18 '17 at 15:46
github.com/Inchoo/Inchoo_PHP7/issues/29
– sv3n
Oct 18 '17 at 15:46
github.com/Inchoo/Inchoo_PHP7/issues/29
– sv3n
Oct 18 '17 at 15:46
add a comment |
app/code/core/Mage/Core/Helper/Data.php
return Zend_Json::decode($encodedValue, $objectDecodeType);
replace
if(!empty($encodedValue)){
return Zend_Json::decode($encodedValue, $objectDecodeType);
} else {
return Zend_Json::decode('{}', $objectDecodeType);
}
Worked for me thank you...!!! I was not able to save inventories config changes.
– Ankur Loriya
Jul 13 '18 at 14:16
add a comment |
app/code/core/Mage/Core/Helper/Data.php
return Zend_Json::decode($encodedValue, $objectDecodeType);
replace
if(!empty($encodedValue)){
return Zend_Json::decode($encodedValue, $objectDecodeType);
} else {
return Zend_Json::decode('{}', $objectDecodeType);
}
Worked for me thank you...!!! I was not able to save inventories config changes.
– Ankur Loriya
Jul 13 '18 at 14:16
add a comment |
app/code/core/Mage/Core/Helper/Data.php
return Zend_Json::decode($encodedValue, $objectDecodeType);
replace
if(!empty($encodedValue)){
return Zend_Json::decode($encodedValue, $objectDecodeType);
} else {
return Zend_Json::decode('{}', $objectDecodeType);
}
app/code/core/Mage/Core/Helper/Data.php
return Zend_Json::decode($encodedValue, $objectDecodeType);
replace
if(!empty($encodedValue)){
return Zend_Json::decode($encodedValue, $objectDecodeType);
} else {
return Zend_Json::decode('{}', $objectDecodeType);
}
edited Oct 18 '17 at 14:24
sv3n
9,64062352
9,64062352
answered Oct 18 '17 at 14:18
Mohd Jabir
211
211
Worked for me thank you...!!! I was not able to save inventories config changes.
– Ankur Loriya
Jul 13 '18 at 14:16
add a comment |
Worked for me thank you...!!! I was not able to save inventories config changes.
– Ankur Loriya
Jul 13 '18 at 14:16
Worked for me thank you...!!! I was not able to save inventories config changes.
– Ankur Loriya
Jul 13 '18 at 14:16
Worked for me thank you...!!! I was not able to save inventories config changes.
– Ankur Loriya
Jul 13 '18 at 14:16
add a comment |
Please try below code
appcodecoreMageCoreHelperData.php line number 657
replace
public function jsonDecode($encodedValue, $objectDecodeType = Zend_Json::TYPE_ARRAY)
{
return Zend_Json::decode($encodedValue, $objectDecodeType);
}
with
public function jsonDecode($encodedValue, $objectDecodeType = Zend_Json::TYPE_ARRAY)
{
if (empty($encodedValue) || $encodedValue == NULL ) {
return Zend_Json::decode('{}', $objectDecodeType);
} else {
return Zend_Json::decode($encodedValue, $objectDecodeType);
}
}
I got the same issue while Persistent Shopping Cart enabled from admin. I fixed issue using above code
– Nimesh Patel
yesterday
add a comment |
Please try below code
appcodecoreMageCoreHelperData.php line number 657
replace
public function jsonDecode($encodedValue, $objectDecodeType = Zend_Json::TYPE_ARRAY)
{
return Zend_Json::decode($encodedValue, $objectDecodeType);
}
with
public function jsonDecode($encodedValue, $objectDecodeType = Zend_Json::TYPE_ARRAY)
{
if (empty($encodedValue) || $encodedValue == NULL ) {
return Zend_Json::decode('{}', $objectDecodeType);
} else {
return Zend_Json::decode($encodedValue, $objectDecodeType);
}
}
I got the same issue while Persistent Shopping Cart enabled from admin. I fixed issue using above code
– Nimesh Patel
yesterday
add a comment |
Please try below code
appcodecoreMageCoreHelperData.php line number 657
replace
public function jsonDecode($encodedValue, $objectDecodeType = Zend_Json::TYPE_ARRAY)
{
return Zend_Json::decode($encodedValue, $objectDecodeType);
}
with
public function jsonDecode($encodedValue, $objectDecodeType = Zend_Json::TYPE_ARRAY)
{
if (empty($encodedValue) || $encodedValue == NULL ) {
return Zend_Json::decode('{}', $objectDecodeType);
} else {
return Zend_Json::decode($encodedValue, $objectDecodeType);
}
}
Please try below code
appcodecoreMageCoreHelperData.php line number 657
replace
public function jsonDecode($encodedValue, $objectDecodeType = Zend_Json::TYPE_ARRAY)
{
return Zend_Json::decode($encodedValue, $objectDecodeType);
}
with
public function jsonDecode($encodedValue, $objectDecodeType = Zend_Json::TYPE_ARRAY)
{
if (empty($encodedValue) || $encodedValue == NULL ) {
return Zend_Json::decode('{}', $objectDecodeType);
} else {
return Zend_Json::decode($encodedValue, $objectDecodeType);
}
}
edited yesterday
answered yesterday
Nimesh Patel
316112
316112
I got the same issue while Persistent Shopping Cart enabled from admin. I fixed issue using above code
– Nimesh Patel
yesterday
add a comment |
I got the same issue while Persistent Shopping Cart enabled from admin. I fixed issue using above code
– Nimesh Patel
yesterday
I got the same issue while Persistent Shopping Cart enabled from admin. I fixed issue using above code
– Nimesh Patel
yesterday
I got the same issue while Persistent Shopping Cart enabled from admin. I fixed issue using above code
– Nimesh Patel
yesterday
add a comment |
Thanks for contributing an answer to Magento Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f109069%2fzend-json-decoding-failed-syntax-error-when-submitting-order%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
I am trying to hunt down the same bug right now: It is happening du to the fact that in Mage_Persistent_Model_Session in _beforeSave() $this->getData() is empty so $info is empty and decoding fails.
– Michael Leiss
Apr 7 '16 at 9:58
1
@MichaelLeiss A user on stackoverflow pointed me into the right direction: PHP 7 throws an exception when trying to decode an empty string, this was not the case in PHP 5.X. A possible solution would be to pass "{}" instead of "".
– Socrates
Apr 7 '16 at 13:35