Page 1 of 1

PHP bug, possible workaround?

Posted: Wed Nov 29, 2006 10:48 am
by John Cartwright
I'm using the Zend Framework, latest SVN edition, and have run into what I think is this bug

Notice: Indirect modification of overloaded property Application_View_Layout::$tracks has no effect in C:\xampp\htdocs\Application\Template\Layout\Index.php on line 250

is generated during this simple iteration,

Code: Select all

<h3>Latest Music </h3>
<?php foreach ($this->tracks as $track) { ?>
<div class="right_articles">
	<p><strong><?php echo $track['title']; ?></strong><br />
		<?php echo $track['artists']; ?> <br />
		<a href="#">Listen</a> | <a href="#">Download</a>
	</p>
</div>
<?php } ?>
Everything is printed as expected. I guess it has to do with magic methods accessing the array, but I have no idea how to get rid of this notice! If you guys need more code, let me know.. but I truly am stumped.

PHP Version 5.2.0

Posted: Wed Nov 29, 2006 2:42 pm
by feyd
Make a copy of the array into a temporary variable?