PluginProbe
Polylang / 2.8
Polylang v2.8
3.8.9 3.8.8 3.8.7 3.8.6 3.8.5 3.8.4 3.8.3 2.7 2.7.0.1 2.7.1 2.7.2 2.7.3 2.7.4 2.8 2.8.1 2.8.2 2.8.3 2.8.4 2.9 2.9.1 2.9.2 3.0 3.0.1 3.0.2 3.0.3 All 233 releases
← All changes | include/translated-object.php +8 -0 2.7.12.8 View file →
@@ -1,5 +1,8 @@
1 1 <?php
2 +/**
3 + * @package Polylang
4 + */
2 5
3 6 /**
4 7 * Setups the objects languages and translations model
5 8 *
@@ -42,8 +45,13 @@
42 45 return false;
43 46 }
44 47
45 48 $object_id = (int) $object_id;
49 +
50 + if ( $object_id < 0 ) {
51 + return false;
52 + }
53 +
46 54 $term = get_object_term_cache( $object_id, $taxonomy );
47 55
48 56 if ( false === $term ) {
49 57 // query language and translations at the same time