php_enable() uses the following code:

 drupal_set_message(t('A !php-code text format has been created.', array('!php-code' => l('PHP code', 'admin/config/content/formats/' . $php_format->format))));

In the documentation for t() is reported the following text:

  • Incorrect HTML in t():

$output .= t('<p>Go to the @contact-page.</p>', array('@contact-page' => l(t('contact page'), 'contact')));

  • Correct HTML in t():

$output .= '<p>' . t('Go to the <a href="@contact-page">contact page</a>.', array('@contact-page' => url('contact'))) . '</p>';

CommentFileSizeAuthor
#2 908772_incorrect_use_of_t_2.patch799 bytesSivaji
PASSED: [[SimpleTest]]: [MySQL] 24,747 pass(es). View
Members fund testing for the Drupal project. Drupal Association Learn more

Comments

kiamlaluno’s picture

Title: Documentation problem with php_enable() » php_enable() uses code that is reported as wrong in the documentation for t()
Component: documentation » php.module
Sivaji’s picture

Title: php_enable() uses code that is reported as wrong in the documentation for t() » Incorrect use of t() in php_enable()
Status: Active » Needs review
FileSize
799 bytes
PASSED: [[SimpleTest]]: [MySQL] 24,747 pass(es). View

Agree with kiamlaluno. Attached patch will provide correct placeholder.

Damien Tournoud’s picture

Status: Needs review » Reviewed & tested by the community

This is exactly right.

Dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to CVS HEAD. Thanks.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.