user image

Eslam Zedan
Published in : 2022-02-24

Warning appears in Zend framework

PHP & Mysql

Hello,

I am Working on Zend 2 and there are warning that appears in Zend framework itself:

Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /var/www/html/vendor/zendframework/library/Zend/Stdlib/ArrayObject.php on line 426

And here is the code that returns the problem:

public function unserialize($data) { $ar = unserialize($data); $this->protectedProperties = array_keys(get_object_vars($this)); $this->setFlags($ar['flag']); $this->exchangeArray($ar['storage']); $this->setIteratorClass($ar['iteratorClass']); foreach ($ar as $k => $v) { switch ($k) { case 'flag': $this->setFlags($v); break; case 'storage': $this->exchangeArray($v); break; case 'iteratorClass': $this->setIteratorClass($v); break; case 'protectedProperties': continue; #This is the line 426 default: $this->__set($k, $v); } } }

Comments

walid mahmoud Date : 2022-02-24

Best answers

4

Best answers

4

you can replace 
continue with continue 2 
the warning will disappear

Leave a comment

Join us

Join our community and get the chance to solve your code issues & share your opinion with us

Sign up Now

Related posts

CodeIgniter route does not work
Publish date: 2022-02-22 | Comments: 4

Tag: PHP & Mysql

php difference between two times in hours
Publish date: 2022-02-25 | Comments: 2

Tag: PHP & Mysql

ERROR 1410 (42000): You are not allowed to create a user with GRANT
Publish date: 2022-04-01 | Comments: 2

Tag: PHP & Mysql

phpmyadmin manual installation gives following error
Publish date: 2022-07-11 | Comments: 6

Tag: PHP & Mysql

Mysql query: How do I count the day streak of particular user?
Publish date: 2022-03-01 | Comments: 4

Tag: PHP & Mysql

[solved] Storage engine 'InnoDB' does not support system tables
Publish date: 2022-01-09 | Comments: 0

Tag: PHP & Mysql

mysql service start not exist
Publish date: 2022-02-23 | Comments: 4

Tag: PHP & Mysql