Skip to content
Snippets Groups Projects
Commit fd96af92 authored by Dries Buytaert's avatar Dries Buytaert
Browse files

- Patch #481504 by JamesAn: converted to drupal_static().

parent 43b21cff
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -355,9 +355,9 @@ function translation_remove_from_set($node) {
* need more properties. The array is indexed by language code.
*/
function translation_node_get_translations($tnid) {
static $translations = array();
if (is_numeric($tnid) && $tnid) {
$translations = &drupal_static(__FUNCTION__, array());
if (!isset($translations[$tnid])) {
$translations[$tnid] = array();
$result = db_select('node', 'n')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment