I am displaying an image in a view.ctp file:

<div class="images view">
<h2><?php  __('Image');?></h2>
        <dl><?php $i = 0; $class = ' class="altrow"';?>
                <dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Id'); ?></dt>
                <dd<?php if ($i++ % 2 == 0) echo $class;?>>
                        <?php echo $image['Image']['id']; ?>
                        &nbsp;
                </dd>
                <dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Caption'); 
?></
dt>
                <dd<?php if ($i++ % 2 == 0) echo $class;?>>
                        <?php echo $image['Image']['caption']; ?>
                        &nbsp;
                </dd>
                <dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Image'); 
?></dt>
                <dd<?php if ($i++ % 2 == 0) echo $class;?>>
                        <?php echo $this->Html->image('gallery/'.$image['Image']
['filename']); ?>
                        &nbsp;
                </dd>
                <dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Created'); 
?></
dt>
                <dd<?php if ($i++ % 2 == 0) echo $class;?>>
                        <?php echo $image['Image']['created']; ?>
                        &nbsp;
                </dd>
        </dl>
</div>
<div class="actions">
        <h3><?php __('Actions'); ?></h3>
        <ul>
                <?php $gallery_id = $image['Image']['gallery_id']; ?>
                <li><?php echo $this->Html->link(__('List Categories', true),
array('controller' => 'categories', 'action' => 'index')); ?> </li>
                <?php if ($logged_in): ?>
                        <li><?php echo $this->Html->link(__('New Image', true),
array('action' => 'add'), $gallery_id); ?> </li>
                <?php endif; ?>
        </ul>
</div>

I get an error:
Warning (2): htmlentities() [function.htmlentities]: charset `1' not
supported, assuming iso-8859-1 [CORE\cake\libs\view\helpers\html.php,
line 298]Code | Context$title   =       "New Image"
$url    =       "/blogtest/images/add"
$options        =       "1"
$confirmMessage =       false
$escapeTitle    =       "1"htmlentities - [internal], line ??
HtmlHelper::link() - CORE\cake\libs\view\helpers\html.php, line 298
include - APP\views\images\view.ctp, line 32
View::_render() - CORE\cake\libs\view\view.php, line 731
View::render() - CORE\cake\libs\view\view.php, line 426
Controller::render() - CORE\cake\libs\controller\controller.php, line
909
Dispatcher::_invoke() - CORE\cake\dispatcher.php, line 207
Dispatcher::dispatch() - CORE\cake\dispatcher.php, line 171
[main] - APP\webroot\index.php, line 83

Fatal error: Cannot unset string offsets in C:\xampp\htdocs\cake\cake
\libs\view\helpers\html.php on line 303

Any ideas?
Thanks.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to