Git Product home page Git Product logo

pht's Issues

XML\Team\Senior constructor doesn't work as expected when there are more than 2 teams

[issue happened with php version 7.0.16]

It seems that $teams is a reference to $this->xml->getElementsByTagName('Teams'), so when a team is removed from $this->xml->getElementsByTagName('Teams'), it gets removed from $teams as well. As a result, the third team won't get checked/removed.
As a follow up error (probably one of many?), the flags are not correct, since those of both remaining teams are combined.

As a workaround, I changed the loops to

for ($t = $teams->length - 1; $t >= 0; $t--) {
 ...
}

which seems to do the trick.

Also, the condition has to be changed to
if ($this->xml->getElementsByTagName('Team')->length >= 2)

How can i get CONSUMER_KEY?

Hello,
How can i get CONSUMER_KEY & CONSUMER_SECRET?
I have this massage on site:
You accepted the CHPP Developer Licence Agreement 2020-02-05 01:30:00

Thanks!

User ID is not set in secondary team HTTeam objects

I'm using v2.21, git hash c20774e.

The problem I get is that if I try to get a user's second and third teams, the user ID is not set in the HTTeam object returned by PHT. This is simple to reproduce - just call $team = $ht->getSecondaryTeam(1234567, 0) (second team) or $team = $ht->getSecondaryTeam(1234567, 1) (third team), where 1234567 is replaced by a userid with two or three teams, and look at $team->getUserId(). The returned value is set to NULL. Primary teams, i.e. with $ht->getPrimaryTeam(1234567), seem unaffected.

Incompatibility with PHP7

Under PHP7 environment, the PHT\Cache\Void and PHT\Log\Void are not valid class names.

Fatal error: Cannot use 'Void' as class name as it is reserved in PHT/Log/Void.php on line 16

What I would suggest here is that we rename the classes to something like VoidCache and VoidLogger, although we will introduce a naming inconsistency in the Cache and Log classes. Another suggestion would be to rename all of the classes, i.e. VoidLogger, FileLogger.

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.