ここの情報は古いです。ご理解頂いた上でお取り扱いください。

Changeset 10338


Ignore:
Timestamp:
Jan 23, 2009, 3:37:12 PM (11 years ago)
Author:
ShogoKawahara
Message:

fixed warning error when the gadget is empty

File:
1 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE3/trunk/lib/model/Gadget.php

    r10322 r10338  
    1818
    1919      $gadgets = GadgetPeer::retrieveByType($this->getType());
    20       $finalGadget = array_pop($gadgets);
    21       if ($finalGadget)
     20      if ($gadgets)
    2221      {
    23         $maxSortOrder = $finalGadget->getSortOrder();
     22        $finalGadget = array_pop($gadgets);
     23        if ($finalGadget)
     24        {
     25          $maxSortOrder = $finalGadget->getSortOrder();
     26        }
    2427      }
    2528
Note: See TracChangeset for help on using the changeset viewer.