Jump to content

php


mssjdb

Recommended Posts

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

Link to comment
Share on other sites

(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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.