mssjdb Posted August 31, 2012 Share Posted August 31, 2012 i am trying this http://net.tutsplus.com/tutorials/javascript-ajax/creating-a-dynamic-poll-with-jquery-and-php/comment-page-2/#comments But it not creating files votes.txt, and ips.txt files as well as it is showing error Strict standards: Declaration of LikeWhereClause::testRow() should be compatible with WhereClause::testRow($row, $rowSchema = NULL) in C:\wamp\www\dynamic_poll\flatfile.php on line 568 How to solve this Please help me 18945_.zip Quote Link to comment https://forums.phpfreaks.com/topic/267859-php/ Share on other sites More sharing options...
DavidAM Posted September 1, 2012 Share Posted September 1, 2012 (I (usually) do not follow links; and I (almost) never download attachments. I practice safe browsing.) The error message is pretty clear. You have a class named WhereClause that has a method named testRow that is defined with two parameters. The first is $row and the second is $rowSchema with a default value of NULL. In the file named flatfile.php you have defined a class named LikeWhereClause which is derived from the aforementioned class. In this class, at (about) line 568 you are defining (overloading) the aforementioned method (testRow) but have used a different signature --- meaning the number of parameters or their defaults are different (maybe the names have to be the same, too; I don't really remember). Personally, I don't agree with this strict standard, but I'm sure that a lot of OOP purists do. I have never studied OOP in depth, though I have used it in several different languages. And I have a book on my shelf titled Object Oriented Design and Development, and that alone, qualifies me to say I don't agree To fix this error, you will need to add the parameters to the method in the derived class so that the method signatures are the same. Quote Link to comment https://forums.phpfreaks.com/topic/267859-php/#findComment-1374431 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.