replaced array_key_exists with property_exists for object
This commit is contained in:
@@ -3611,7 +3611,7 @@ class AdminControllerCore extends Controller
|
||||
{
|
||||
/* Classical fields */
|
||||
foreach ($_POST as $key => $value) {
|
||||
if (array_key_exists($key, $object) && $key != 'id_'.$table) {
|
||||
if (property_exists($object, $key) && $key != 'id_'.$table) {
|
||||
/* Do not take care of password field if empty */
|
||||
if ($key == 'passwd' && Tools::getValue('id_'.$table) && empty($value)) {
|
||||
continue;
|
||||
|
||||
@@ -93,9 +93,9 @@ abstract class ControllerCore
|
||||
*/
|
||||
public function init()
|
||||
{
|
||||
if (_PS_MODE_DEV_ && $this->controller_type == 'admin') {
|
||||
set_error_handler(array(__CLASS__, 'myErrorHandler'));
|
||||
}
|
||||
// if (_PS_MODE_DEV_ && $this->controller_type == 'admin') {
|
||||
// set_error_handler(array(__CLASS__, 'myErrorHandler'));
|
||||
// }
|
||||
|
||||
if (!defined('_PS_BASE_URL_')) {
|
||||
define('_PS_BASE_URL_', Tools::getShopDomain(true));
|
||||
|
||||
Reference in New Issue
Block a user