After my recent migration of both db and fresh install of PhpGedView, this popped up.
Creating default object from empty value, search.php:636
function printDatabaseSelector()
global $ALLOW_CHANGE_GEDCOM, $pgv_lang, $TEXT_DIRECTION;
...
$controller->inputFieldNames[] = "${str}"; // !!! first appearance of $controller
...
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Ah, sorry - this warning message was visible on my web page (because of the settings for php to show errors). It appears that $controller was not declared global within this function, so then $controller would be a new object local only to this function, and it is then not used in this function.
I wonder if $controller should be added to the global list for this function.
Last edit: David Smart 2020-10-08
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It looks like I have another item in search.php.
I was not logged in at the time, and I noticed some data was hidden for privacy reasons. I'm sorry but I don't have time right now to dig deeper on this one.
This latest error occurs when doing privacy checks on families that have no recorded parents.
The attached search.zip should fix this problem. The previous search.zip has been incorporated into this one. No change to the actual file, search.php -- for convenience, the two fixes have been combined into one file.
I observed this with the aid of googling the text of the real blunders message for social (the line underneath "Your modern database configuration is bad. ...".)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
After my recent migration of both db and fresh install of PhpGedView, this popped up.
Creating default object from empty value, search.php:636
What are you telling me? What are you trying to accomplish?
Ah, sorry - this warning message was visible on my web page (because of the settings for php to show errors). It appears that $controller was not declared global within this function, so then $controller would be a new object local only to this function, and it is then not used in this function.
I wonder if $controller should be added to the global list for this function.
Last edit: David Smart 2020-10-08
The Search function worked for me without any changes, but I was using PHP 5.4. I was able to select the desired GEDCOM to be searched.
Exactly what error messages were you getting?
Try the attached search.php to see whether whatever error message you were getting goes away.
Let us know what happens.
David:
Did this change fix your problem?
I'd like to get it into SVN.
Gerry, That appears to be the perfect fix. My original error message:
This was followed by checkboxes for each db.
It looks like I have another item in search.php.
I was not logged in at the time, and I noticed some data was hidden for privacy reasons. I'm sorry but I don't have time right now to dig deeper on this one.
line 36 of search is the "$controller->init();" after applying the changes you proposed.
Last edit: David Smart 2020-10-09
This latest error occurs when doing privacy checks on families that have no recorded parents.
The attached search.zip should fix this problem. The previous search.zip has been incorporated into this one. No change to the actual file, search.php -- for convenience, the two fixes have been combined into one file.
That's a good change too - as best I can tell. Thanks!
SVN has been updated.
I observed this with the aid of googling the text of the real blunders message for social (the line underneath "Your modern database configuration is bad. ...".)
What are you telling me?
If you're trying to report an error, please upgrade your PhpGedView installation to the latest-and-greatest "SVN" version first.
You can download the most recent SVN snapshot from here:
https://sourceforge.net/p/phpgedview/svn/HEAD/tree/trunk/phpGedView