Hi,

Based the egg & stub example, i create egg-stub concept,

EX: protected function createStub($migration, array $source_id) , its throws warning error.

Strict warning: Declaration of DrupalNode7ArticleMigration::createStub() should be compatible with DrupalNodeMigration::createStub($migration) in require_once() (line 10 of sites/all/modules/custom/migration/classfiles/articles/article.inc).

How to fix this warning error.

Regards,
tssarun.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

tssarun created an issue. See original summary.

tssarun’s picture

Priority: Major » Critical
Ben Buske’s picture

I think the error message requests that other functions that try to use the createStub function like it is possible with the parent won't get an error. With a default value like that i don't get the error anymore.

protected function createStub($migration, array $source_id = array()) {
}
anrikun’s picture

Title: createstub throwing warning error » createStub() in node.inc throws a strict warning error when overridden
Category: Support request » Bug report
Priority: Critical » Normal
Status: Active » Needs review
FileSize
467 bytes

Here's a simple patch fixing createStub() declaration.

krisahil’s picture

Status: Needs review » Reviewed & tested by the community

This patch fixes the strict warning for me.