Skip to content
Permalink
Browse files

Fixing more E_STRICT notices and adding a type check to DboSource::dr…

…opSchema().
  • Loading branch information...
markstory committed Dec 4, 2010
1 parent a6c5065 commit 8031d33d33188cb32bb3a72b978acca844c0a5e4
@@ -500,16 +500,12 @@ function alterSchema($compare, $table = null) {
/**
* Generate a MySQL "drop table" statement for the given Schema object
*
* @param object $schema An instance of a subclass of CakeSchema
* @param CakeSchema $schema An instance of a subclass of CakeSchema
* @param string $table Optional. If specified only the table name given will be generated.
* Otherwise, all tables defined in the schema are generated.
* @return string
*/
function dropSchema($schema, $table = null) {
if (!is_a($schema, 'CakeSchema')) {
trigger_error(__('Invalid schema object'), E_USER_WARNING);
return null;
}
function dropSchema(CakeSchema $schema, $table = null) {
$out = '';
foreach ($schema->tables as $curTable => $columns) {
if (!$table || $table == $curTable) {
@@ -1121,16 +1121,12 @@ function queryAssociation($model, &$linkModel, $type, $association, $assocData,
/**
* Generate a "drop table" statement for the given Schema object
*
* @param object $schema An instance of a subclass of CakeSchema
* @param CakeSchema $schema An instance of a subclass of CakeSchema
* @param string $table Optional. If specified only the table name given will be generated.
* Otherwise, all tables defined in the schema are generated.
* @return string
*/
function dropSchema($schema, $table = null) {
if (!is_a($schema, 'CakeSchema')) {
trigger_error(__('Invalid schema object'), E_USER_WARNING);
return null;
}
function dropSchema(CakeSchema $schema, $table = null) {
$out = '';
foreach ($schema->tables as $curTable => $columns) {
@@ -138,7 +138,7 @@ function enabled() {
* @return array Array of tablenames in the database
* @access public
*/
function listSources() {
function listSources($data = null) {
$cache = parent::listSources();
if ($cache != null) {
return $cache;
@@ -2801,16 +2801,12 @@ function alterSchema($compare, $table = null) {
/**
* Generate a "drop table" statement for the given Schema object
*
* @param object $schema An instance of a subclass of CakeSchema
* @param CakeSchema $schema An instance of a subclass of CakeSchema
* @param string $table Optional. If specified only the table name given will be generated.
* Otherwise, all tables defined in the schema are generated.
* @return string
*/
public function dropSchema($schema, $table = null) {
if (!is_a($schema, 'CakeSchema')) {
trigger_error(__('Invalid schema object'), E_USER_WARNING);
return null;
}
public function dropSchema(CakeSchema $schema, $table = null) {
$out = '';
foreach ($schema->tables as $curTable => $columns) {
@@ -42,7 +42,7 @@ class DboSqliteTestDb extends DboSqlite {
* @access protected
* @return void
*/
function _execute($sql) {
function _execute($sql, $params = array()) {
$this->simulated[] = $sql;
return null;
}

0 comments on commit 8031d33

Please sign in to comment.
You can’t perform that action at this time.