WordPress.org

Making WordPress.org

Changeset 1841


Ignore:
Timestamp:
08/20/15 13:28:01 (2 years ago)
Author:
ocean90
Message:

Translate: Avoid PHP notices if a project has no parent project, like Apps.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/translate.wordpress.org/includes/gp-plugins/wporg-routes/routes/locale.php

    r1839 r1841  
    171171     */ 
    172172    private function get_project_icon( $project, $sub_project, $size = 128 ) { 
    173  
    174173        // The Waiting tab will have $sub_project's which are not sub-projects of $project 
    175         if ( $sub_project->parent_project_id !== $project->id ) { 
     174        if ( $sub_project->parent_project_id && $sub_project->parent_project_id !== $project->id ) { 
    176175            $project = GP::$project->get( $sub_project->parent_project_id ); 
    177176            // In the case of Plugins, we may need to go up another level yet 
Note: See TracChangeset for help on using the changeset viewer.