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

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

Tag: PHP & Mysql

SQL full languages table
Publish date: 2022-02-24 | Comments: 2

Tag: PHP & Mysql

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

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

How the image file have .php extension?
Publish date: 2022-03-01 | Comments: 2

Tag: PHP & Mysql

(Mysql) Count User's signing in activity based on daily login logs
Publish date: 2022-11-05 | Comments: 0

Tag: PHP & Mysql

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

Tag: PHP & Mysql