Ticket #21839: return-by-ref-audit.diff
| File return-by-ref-audit.diff, 8.2 KB (added by , 14 years ago) |
|---|
-
wp-includes/category.php
36 36 * @param string|array $args Optional. Change the defaults retrieving categories. 37 37 * @return array List of categories. 38 38 */ 39 function &get_categories( $args = '' ) {39 function get_categories( $args = '' ) { 40 40 $defaults = array( 'taxonomy' => 'category' ); 41 41 $args = wp_parse_args( $args, $defaults ); 42 42 … … 78 78 * @param string $filter Optional. Default is raw or no WordPress defined filter will applied. 79 79 * @return mixed Category data in type defined by $output parameter. 80 80 */ 81 function &get_category( $category, $output = OBJECT, $filter = 'raw' ) {81 function get_category( $category, $output = OBJECT, $filter = 'raw' ) { 82 82 $category = get_term( $category, 'category', $output, $filter ); 83 83 if ( is_wp_error( $category ) ) 84 84 return $category; … … 249 249 * @param string|array $args Tag arguments to use when retrieving tags. 250 250 * @return array List of tags. 251 251 */ 252 function &get_tags( $args = '' ) {252 function get_tags( $args = '' ) { 253 253 $tags = get_terms( 'post_tag', $args ); 254 254 255 255 if ( empty( $tags ) ) { … … 280 280 * @param string $filter Optional. Default is raw or no WordPress defined filter will applied. 281 281 * @return object|array Return type based on $output value. 282 282 */ 283 function &get_tag( $tag, $output = OBJECT, $filter = 'raw' ) {283 function get_tag( $tag, $output = OBJECT, $filter = 'raw' ) { 284 284 return get_term( $tag, 'post_tag', $output, $filter ); 285 285 } 286 286 -
wp-includes/taxonomy.php
859 859 * @return mixed|null|WP_Error Term Row from database. Will return null if $term is empty. If taxonomy does not 860 860 * exist then WP_Error will be returned. 861 861 */ 862 function &get_term($term, $taxonomy, $output = OBJECT, $filter = 'raw') {862 function get_term($term, $taxonomy, $output = OBJECT, $filter = 'raw') { 863 863 global $wpdb; 864 864 $null = null; 865 865 … … 1176 1176 * @param string|array $args The values of what to search for when returning terms 1177 1177 * @return array|WP_Error List of Term Objects and their children. Will return WP_Error, if any of $taxonomies do not exist. 1178 1178 */ 1179 function &get_terms($taxonomies, $args = '') {1179 function get_terms($taxonomies, $args = '') { 1180 1180 global $wpdb; 1181 1181 $empty_array = array(); 1182 1182 … … 2635 2635 * @param string $taxonomy Taxonomy Name 2636 2636 * @return bool|array Empty array if $terms found, but not $taxonomy. False if nothing is in cache for $taxonomy and $id. 2637 2637 */ 2638 function &get_object_term_cache($id, $taxonomy) {2638 function get_object_term_cache($id, $taxonomy) { 2639 2639 $cache = wp_cache_get($id, "{$taxonomy}_relationships"); 2640 2640 return $cache; 2641 2641 } … … 2781 2781 * @param string $taxonomy The taxonomy which determines the hierarchy of the terms. 2782 2782 * @return array The subset of $terms that are descendants of $term_id. 2783 2783 */ 2784 function &_get_term_children($term_id, $terms, $taxonomy) {2784 function _get_term_children($term_id, $terms, $taxonomy) { 2785 2785 $empty_array = array(); 2786 2786 if ( empty($terms) ) 2787 2787 return $empty_array; -
wp-includes/pomo/mo.php
215 215 * @param string $translation translation string from MO file. Might contain 216 216 * 0x00 as a plural translations separator 217 217 */ 218 function &make_entry($original, $translation) {218 function make_entry($original, $translation) { 219 219 $entry = new Translation_Entry(); 220 220 // look for context 221 221 $parts = explode(chr(4), $original); -
wp-includes/post.php
3370 3370 * @param array $pages List of pages' objects. 3371 3371 * @return array 3372 3372 */ 3373 function &get_page_children($page_id, $pages) {3373 function get_page_children($page_id, $pages) { 3374 3374 $page_list = array(); 3375 3375 foreach ( (array) $pages as $page ) { 3376 3376 if ( $page->post_parent == $page_id ) { … … 3394 3394 * @param int $page_id Parent page ID. 3395 3395 * @return array A list arranged by hierarchy. Children immediately follow their parents. 3396 3396 */ 3397 function &get_page_hierarchy( &$pages, $page_id = 0 ) {3397 function get_page_hierarchy( &$pages, $page_id = 0 ) { 3398 3398 if ( empty( $pages ) ) { 3399 3399 $result = array(); 3400 3400 return $result; … … 3462 3462 * @param mixed $args Optional. Array or string of options that overrides defaults. 3463 3463 * @return array List of pages matching defaults or $args 3464 3464 */ 3465 function &get_pages($args = '') {3465 function get_pages($args = '') { 3466 3466 global $wpdb; 3467 3467 3468 3468 $pages = false; … … 4950 4950 * @param string $filter Optional sanitation filter. @see sanitize_post() 4951 4951 * @return mixed Null if error or post object if success 4952 4952 */ 4953 function &wp_get_post_revision(&$post, $output = OBJECT, $filter = 'raw') {4953 function wp_get_post_revision(&$post, $output = OBJECT, $filter = 'raw') { 4954 4954 $null = null; 4955 4955 if ( !$revision = get_post( $post, OBJECT, $filter ) ) 4956 4956 return $revision; -
wp-includes/comment.php
127 127 * @param string $output Optional. OBJECT or ARRAY_A or ARRAY_N constants. 128 128 * @return object|array|null Depends on $output value. 129 129 */ 130 function &get_comment(&$comment, $output = OBJECT) {130 function get_comment(&$comment, $output = OBJECT) { 131 131 global $wpdb; 132 132 $null = null; 133 133 … … 723 723 * @param array $comments Array of comments 724 724 * @return array Array of comments keyed by comment_type. 725 725 */ 726 function &separate_comments(&$comments) {726 function separate_comments(&$comments) { 727 727 $comments_by_type = array('comment' => array(), 'trackback' => array(), 'pingback' => array(), 'pings' => array()); 728 728 $count = count($comments); 729 729 for ( $i = 0; $i < $count; $i++ ) { -
wp-includes/l10n.php
493 493 * @param string $domain 494 494 * @return object A Translation instance 495 495 */ 496 function &get_translations_for_domain( $domain ) {496 function get_translations_for_domain( $domain ) { 497 497 global $l10n; 498 498 if ( !isset( $l10n[$domain] ) ) { 499 499 $l10n[$domain] = new NOOP_Translations; -
wp-includes/query.php
86 86 * @param string $query 87 87 * @return array List of posts 88 88 */ 89 function &query_posts($query) {89 function query_posts($query) { 90 90 unset($GLOBALS['wp_query']); 91 91 $GLOBALS['wp_query'] = new WP_Query(); 92 92 return $GLOBALS['wp_query']->query($query); … … 1916 1916 * 1917 1917 * @return array List of posts. 1918 1918 */ 1919 function &get_posts() {1919 function get_posts() { 1920 1920 global $wpdb, $user_ID, $_wp_using_ext_object_cache; 1921 1921 1922 1922 $this->parse_query(); … … 2936 2936 * @param string $query URL query string. 2937 2937 * @return array List of posts. 2938 2938 */ 2939 function &query( $query ) {2939 function query( $query ) { 2940 2940 $this->init(); 2941 2941 $this->query = $this->query_vars = wp_parse_args( $query ); 2942 2942 return $this->get_posts(); -
wp-includes/class-oembed.php
296 296 * 297 297 * @return WP_oEmbed object. 298 298 */ 299 function &_wp_oembed_get_object() {299 function _wp_oembed_get_object() { 300 300 static $wp_oembed; 301 301 302 302 if ( is_null($wp_oembed) ) -
wp-includes/http.php
19 19 * 20 20 * @return WP_Http HTTP Transport object. 21 21 */ 22 function &_wp_http_get_object() {22 function _wp_http_get_object() { 23 23 static $http; 24 24 25 25 if ( is_null($http) )
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)