Changeset 22823


Ignore:
Timestamp:
2013/05/19 20:34:20 (8 years ago)
Author:
Seasoft
Message:

#2248 (PHP 警告撲滅 for 2.13.0)

Location:
branches/version-2_13-dev/data/class/helper
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_13-dev/data/class/helper/SC_Helper_PageLayout.php

    r22786 r22823  
    162162    { 
    163163        $objQuery =& SC_Query_Ex::getSingletonInstance(); 
     164 
    164165        $table = <<< __EOF__ 
    165166        dtb_blocposition AS pos 
     
    174175            $this->setBlocPathTo($device_type_id, $arrBlocs); 
    175176        } 
    176          
     177 
    177178        //全ページ設定と各ページのブロックの重複を削除 
     179        $arrUniqBlocIds = array(); 
    178180        foreach ($arrBlocs as $index => $arrBloc) { 
    179             if($arrBloc['anywhere'] == 1){ 
     181            if ($arrBloc['anywhere'] == 1){ 
    180182                $arrUniqBlocIds[] = $arrBloc['bloc_id']; 
    181183            } 
    182184        } 
    183185        foreach ($arrBlocs as $bloc_index => $arrBlocData) { 
    184             if(in_array($arrBlocData['bloc_id'], $arrUniqBlocIds) && $arrBlocData['anywhere'] == 0){ 
     186            if (in_array($arrBlocData['bloc_id'], $arrUniqBlocIds) && $arrBlocData['anywhere'] == 0){ 
    185187                unset($arrBlocs[$bloc_index]); 
    186188            } 
    187189        } 
     190 
    188191        return $arrBlocs; 
    189192    } 
  • branches/version-2_13-dev/data/class/helper/SC_Helper_Transform.php

    r22567 r22823  
    236236    public function insertBefore($html_snip) 
    237237    { 
    238         foreach ($this->arrSelectElements[$this->search_depth] as $key => $objElement) { 
    239             $this->lfSetTransform('insertBefore', $objElement[0], $html_snip); 
     238        if (isset($this->arrSelectElements[$this->search_depth])) { 
     239            foreach ($this->arrSelectElements[$this->search_depth] as $key => $objElement) { 
     240                $this->lfSetTransform('insertBefore', $objElement[0], $html_snip); 
     241            } 
    240242        } 
    241243        return $this; 
     
    251253    public function insertAfter($html_snip) 
    252254    { 
    253         foreach ($this->arrSelectElements[$this->search_depth] as $key => $objElement) { 
    254             $this->lfSetTransform('insertAfter', $objElement[0], $html_snip); 
     255        if (isset($this->arrSelectElements[$this->search_depth])) { 
     256            foreach ($this->arrSelectElements[$this->search_depth] as $key => $objElement) { 
     257                $this->lfSetTransform('insertAfter', $objElement[0], $html_snip); 
     258            } 
    255259        } 
    256260        return $this; 
     
    266270    public function appendFirst($html_snip) 
    267271    { 
    268         foreach ($this->arrSelectElements[$this->search_depth] as $key => $objElement) { 
    269             $this->lfSetTransform('appendFirst', $objElement[0], $html_snip); 
     272        if (isset($this->arrSelectElements[$this->search_depth])) { 
     273            foreach ($this->arrSelectElements[$this->search_depth] as $key => $objElement) { 
     274                $this->lfSetTransform('appendFirst', $objElement[0], $html_snip); 
     275            } 
    270276        } 
    271277        return $this; 
     
    281287    public function appendChild($html_snip) 
    282288    { 
    283         foreach ($this->arrSelectElements[$this->search_depth] as $key => $objElement) { 
    284             $this->lfSetTransform('appendChild', $objElement[0], $html_snip); 
     289        if (isset($this->arrSelectElements[$this->search_depth])) { 
     290            foreach ($this->arrSelectElements[$this->search_depth] as $key => $objElement) { 
     291                $this->lfSetTransform('appendChild', $objElement[0], $html_snip); 
     292            } 
    285293        } 
    286294        return $this; 
     
    296304    public function replaceElement($html_snip) 
    297305    { 
    298         foreach ($this->arrSelectElements[$this->search_depth] as $key => &$objElement) { 
    299             $this->lfSetTransform('replaceElement', $objElement[0], $html_snip); 
     306        if (isset($this->arrSelectElements[$this->search_depth])) { 
     307            foreach ($this->arrSelectElements[$this->search_depth] as $key => &$objElement) { 
     308                $this->lfSetTransform('replaceElement', $objElement[0], $html_snip); 
     309            } 
    300310        } 
    301311        return $this; 
     
    310320    public function removeElement() 
    311321    { 
    312         foreach ($this->arrSelectElements[$this->search_depth] as $key => &$objElement) { 
    313             $this->lfSetTransform('replaceElement', $objElement[0], ''); 
     322        if (isset($this->arrSelectElements[$this->search_depth])) { 
     323            foreach ($this->arrSelectElements[$this->search_depth] as $key => &$objElement) { 
     324                $this->lfSetTransform('replaceElement', $objElement[0], ''); 
     325            } 
    314326        } 
    315327        return $this; 
     
    579591            $this->arrSelectElements[$this->search_depth][$arrElement[0]] = array($elementNo, &$arrElement[1]); 
    580592        } 
    581  
    582593    } 
    583594 
Note: See TracChangeset for help on using the changeset viewer.