Question

This is what I have :

<?php 
$textDelete = __('Delete' . ($index ? '' : ' This ' . $identifier));
$linkDelete = array('controller' => 'students', 'action' => 'delete', $id);
$confirmDelete = 'You are about to delete student:\n\n\x22'
                   . $student['Student']['last_name'] . ', ' 
                   . $student['Student']['first_name'] . ' ' 
                   . $student['Student']['middle_initial'] 
                   . '\x22\n\n  Are you sure?';

echo $this->Html->link(
                       $textDelete,
                       $linkDelete,
                       array('escape' => false),
                       $confirmDelete
                    );
 ?>

It was working fine, till we upgraded to CakePHP 2.4! Now the confirmation message (all of them) of the link shows the \n\n and \x22 instead of quotes symbol or new lines, any ideas?

Was it helpful?

Solution

Honestly I was going to delete the question! But I thought its too silly for someone else to waste half a day on it! Just replace single quotes with double quotes and everything back to normal again! (embarrassing)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top