mirror of
				https://github.com/yiisoft/yii2.git
				synced 2025-11-04 06:37:55 +08:00 
			
		
		
		
	Do not use $this to call static method
This commit is contained in:
		@ -1152,7 +1152,7 @@ abstract class BaseActiveRecord extends Model implements ActiveRecordInterface
 | 
				
			|||||||
     */
 | 
					     */
 | 
				
			||||||
    public function getOldPrimaryKey($asArray = false)
 | 
					    public function getOldPrimaryKey($asArray = false)
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        $keys = $this->primaryKey();
 | 
					        $keys = static::primaryKey();
 | 
				
			||||||
        if (empty($keys)) {
 | 
					        if (empty($keys)) {
 | 
				
			||||||
            throw new Exception(get_class($this) . ' does not have a primary key. You should either define a primary key for the corresponding table or override the primaryKey() method.');
 | 
					            throw new Exception(get_class($this) . ' does not have a primary key. You should either define a primary key for the corresponding table or override the primaryKey() method.');
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user