Make WordPress Core

Changeset 19094


Ignore:
Timestamp:
10/31/2011 07:38:46 PM (12 years ago)
Author:
ryan
Message:

Avoid E_STRICT notices. see #18975

Location:
trunk/wp-includes
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/class-http.php

    r19054 r19094  
    347347     *                  Then a numbered array is returned as the value of that header-key.
    348348     */
    349     function processHeaders($headers) {
     349    public static function processHeaders($headers) {
    350350        // split headers, one per array element
    351351        if ( is_string($headers) ) {
     
    414414     * @param array $r Full array of args passed into ::request()
    415415     */
    416     function buildCookieHeader( &$r ) {
     416    public static function buildCookieHeader( &$r ) {
    417417        if ( ! empty($r['cookies']) ) {
    418418            $cookies_header = '';
     
    757757     * @return boolean False means this class can not be used, true means it can.
    758758     */
    759     function test( $args = array() ) {
     759    public static function test( $args = array() ) {
    760760        if ( ! function_exists( 'fsockopen' ) )
    761761            return false;
     
    940940     * @return boolean False means this class can not be used, true means it can.
    941941     */
    942     function test( $args = array() ) {
     942    public static function test( $args = array() ) {
    943943        if ( ! function_exists( 'fopen' ) )
    944944            return false;
     
    11671167     * @return boolean False means this class can not be used, true means it can.
    11681168     */
    1169     function test( $args = array() ) {
     1169    public static function test( $args = array() ) {
    11701170        if ( ! function_exists( 'curl_init' ) || ! function_exists( 'curl_exec' ) )
    11711171            return false;
     
    15811581     * @return string|bool False on failure.
    15821582     */
    1583     function compress( $raw, $level = 9, $supports = null ) {
     1583    public static function compress( $raw, $level = 9, $supports = null ) {
    15841584        return gzdeflate( $raw, $level );
    15851585    }
     
    15991599     * @return string|bool False on failure.
    16001600     */
    1601     function decompress( $compressed, $length = null ) {
     1601    public static function decompress( $compressed, $length = null ) {
    16021602
    16031603        if ( empty($compressed) )
     
    16431643     * @return string|bool False on failure.
    16441644     */
    1645     function compatible_gzinflate($gzData) {
     1645    public static function compatible_gzinflate($gzData) {
    16461646
    16471647        // Compressed data might contain a full header, if so strip it for gzinflate()
     
    16811681     * @return string Types of encoding to accept.
    16821682     */
    1683     function accept_encoding() {
     1683    public static function accept_encoding() {
    16841684        $type = array();
    16851685        if ( function_exists( 'gzinflate' ) )
     
    17021702     * @return string Content-Encoding string to send in the header.
    17031703     */
    1704     function content_encoding() {
     1704    public static function content_encoding() {
    17051705        return 'deflate';
    17061706    }
     
    17141714     * @return bool
    17151715     */
    1716     function should_decode($headers) {
     1716    public static function should_decode($headers) {
    17171717        if ( is_array( $headers ) ) {
    17181718            if ( array_key_exists('content-encoding', $headers) && ! empty( $headers['content-encoding'] ) )
     
    17361736     * @return bool
    17371737     */
    1738     function is_available() {
     1738    public static function is_available() {
    17391739        return ( function_exists('gzuncompress') || function_exists('gzdeflate') || function_exists('gzinflate') );
    17401740    }
  • trunk/wp-includes/class-wp.php

    r19017 r19094  
    573573     * @return string
    574574     */
    575     function apply($subject, $matches) {
     575    public static function apply($subject, $matches) {
    576576        $oSelf = new WP_MatchesMapRegex($subject, $matches);
    577577        return $oSelf->output;
  • trunk/wp-includes/general-template.php

    r19033 r19094  
    16221622
    16231623    if ( is_single() || is_page() ) {
    1624         $post = &get_post( $id = 0 );
     1624        $id = 0;
     1625        $post = &get_post( $id );
    16251626
    16261627        if ( comments_open() || pings_open() || $post->comment_count > 0 ) {
  • trunk/wp-includes/ms-load.php

    r18604 r19094  
    135135function wpmu_current_site() {
    136136    global $wpdb, $current_site, $domain, $path, $sites, $cookie_domain;
     137
     138    if ( empty( $current_site ) )
     139        $current_site = new stdClass;
     140
    137141    if ( defined( 'DOMAIN_CURRENT_SITE' ) && defined( 'PATH_CURRENT_SITE' ) ) {
    138142        $current_site->id = defined( 'SITE_ID_CURRENT_SITE' ) ? SITE_ID_CURRENT_SITE : 1;
  • trunk/wp-includes/post.php

    r19075 r19094  
    40284028            $icon_files = array();
    40294029            while ( $dirs ) {
    4030                 $dir = array_shift($keys = array_keys($dirs));
     4030                $keys = array_keys( $dirs );
     4031                $dir = array_shift( $keys );
    40314032                $uri = array_shift($dirs);
    40324033                if ( $dh = opendir($dir) ) {
Note: See TracChangeset for help on using the changeset viewer.