Git Product home page Git Product logo

Comments (8)

fisharebest avatar fisharebest commented on May 29, 2024

edit_interface.php is used for many different types of editing. It appears to work OK on the demo site - http://dev.webtrees.net/demo-stable/

Unless I can see the problem, it is difficult to make suggestions.

from webtrees.

fisharebest avatar fisharebest commented on May 29, 2024

Do you still see this problem?

If yes - which form?

from webtrees.

magicsunday avatar magicsunday commented on May 29, 2024

In WT_Filter::_inputArray the PHP 5.3 shorthand form of the ternary operator ?: is used.

return $tmp[$variable] ?: array();

Although my QNAP NAS is running PHP 5.3.26, it seems to fail to resolve the expression. I dont know why. Inside my Development-VM I run PHP 5.3.8 without throwing any errors. If I replace it with the default syntax, in my eyes also much more easier to read.

return isset($tmp[$variable]) ? $tmp[$variable] : array();

The error went away.

WT_Filter seems to be the only place where the shorthand form of the operator is used (My search founds 6 matches). Maybe those affected lines could be replaced with the normal syntax?

from webtrees.

fisharebest avatar fisharebest commented on May 29, 2024

I don't think the "?:" is the problem (and you don't supply the actual PHP error message).

More likely, $tmp[$variable] is not set (failed validation??), and you are seeing an error for this.

Perhaps $default needs to be array() rather than null ?

from webtrees.

magicsunday avatar magicsunday commented on May 29, 2024

There is actual no PHP error message as the server connection gets lost. Problem still exists after changing $default to an array(). $tmp[$varialbe] is also set. Only changing to the long hand version of the ternary operator resolves the problem.

from webtrees.

fisharebest avatar fisharebest commented on May 29, 2024

Can you create a test for this in isolation? e.g.

<?php echo 1 ?: 2;

from webtrees.

magicsunday avatar magicsunday commented on May 29, 2024

After loading the testpage for the first time the result 1 is displayed. After reloading the page for several times, that the error occurs from time to time (3 success, 1 error and so on).

Seems to be a bug in QNAP php version. But there is currently no way to upgrade to a newer version without compiling it by myself.

from webtrees.

fisharebest avatar fisharebest commented on May 29, 2024

I have finally gained access to a QNAP to investigate this problem...

It appears to be a bug in the eAccelerator module. Disabling this module fixes the problem.

from webtrees.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.