Skip to content
Permalink
Browse files

bug 3156 fixed: avoid warning on PHP 5.2 for nl2br second parameter

git-svn-id: http://piwigo.org/svn/trunk@29901 68402e56-0260-453c-a942-63ccdbb3a9ee
  • Loading branch information...
plegall committed Oct 6, 2014
1 parent 596c34b commit c4017d2a8a55a7424f77067563246d9458f7e94e
Showing with 11 additions and 1 deletion.
  1. +11 −1 picture.php
@@ -137,7 +137,17 @@
// add default event handler for rendering element content
add_event_handler('render_element_content', 'default_picture_content');
// add default event handler for rendering element description
add_event_handler('render_element_description', 'nl2br');
add_event_handler('render_element_description', 'pwg_nl2br');
/**
* pwg_nl2br is useful for PHP 5.2 which doesn't accept more than 1
* parameter on nl2br() (and anyway the second parameter of nl2br does not
* match what Piwigo gives.
*/
function pwg_nl2br($string)
{
return nl2br($string);
}
trigger_notify('loc_begin_picture');

0 comments on commit c4017d2

Please sign in to comment.
You can’t perform that action at this time.