ֹ㳡㳡

Ӳָȫʹ˵:

1. һ: /  <> (֧綯㳡衢Ӣ㳡)
2. ɢһ: / ɢ
3. : /  <>
4. : / 
5. ܾ: / ܾ
6.  ˳: / ˳
7. ᳤߳Ա: /  <>
8. ᳤ת: / ᳤
9. ӹ: / 
10. 鿴ӹ: / Ϣ
11. 鿴: / 
(ͬһ2軥PK˺)

Ա޸3BUGϸ˵
1. ﷨߼BUG
1.1 ﷨СBUG
if(count($args == 2)) {
Ϊ
if(count($args) == 2) {
if(count($args == 1)) {
Ϊ
if(count($args) == 1) {
˵:ôССBUG,Խ,ᵼ³.
BUGû޸֮ǰĺ̨ʾ:
00:54:56 [CRITICAL] Unhandled exception executing command 'f create' in f: Undefined offset: 1
00:54:56 [NOTICE] ArrayOutOfBoundsException: "Undefined offset: 1" (E_NOTICE) in "/FactionsPro.phar/src/FactionsPro/Main" at line 62

1.2 ߼СBUG
else {
    $sender->sendMessage("[ӹ] ʹ /  г");
}
Ϊ
f(count($args) > [2]) {
    $sender->sendMessage("[ӹ] ʹ /  г");
}
˵: ⲻ,ҪӰôʱ÷ʾϢ!
2. 󴫲BUG
public function factionPVP(EntityDamageByEntityEvent $factionDamage) {
......
}
Ϊ
public function factionPVP(EntityDamageEvent $factionDamage) {
if($factionDamage instanceof EntityDamageByEntityEvent){
......
}
}
˵:factionPVPյ2˺¼:EntityDamageEvent, EntityDamageByEntityEvent;
EntityDamageEventǸ,EntityDamageByEntityEvent;
ĽղΪ,ͬʱո;
factionPVPֻҪõEntityDamageByEntityEvent,ԼӸifһ!
BUGᵼº̨ˢ:һmoved wrongly,ͻᵼδʾϢ,Nmoved wrongly,ͻᵼδʾϢһֱˢ!
BUGû޸֮ǰĺ̨ʾ:
18:44:08 [CRITICAL] Could not pass event pocketmine\event\entity\EntityDamageEvent to FactionsPro v1.0.1: Argument 1 passed to FactionsPro\Main::factionPVP() must be an instance of pocketmine\event\entity\EntityDamageByEntityEvent, instance of pocketmine\event\entity\EntityDamageEvent given, called in phar:///home/pocketmine/PocketMine-MP.phar/src/pocketmine/plugin/MethodEventExecutor.php on line 36 and defined on FactionsPro\Main
18:44:08 [NOTICE] InvalidArgumentException: "Argument 1 passed to FactionsPro\Main::factionPVP() must be an instance of pocketmine\event\entity\EntityDamageByEntityEvent, instance of pocketmine\event\entity\EntityDamageEvent given, called in phar:///home/pocketmine/PocketMine-MP.phar/src/pocketmine/plugin/MethodEventExecutor.php on line 36 and defined" (E_RECOVERABLE_ERROR) in "/FactionsPro.phar/src/FactionsPro/Main" at line 323
3. ݿBUG
$this->db->query("DELETE * FROM confirm WHERE player='$player';");
Ϊ
$this->db->query("DELETE FROM confirm WHERE player='$player';");
$this->db->query("DELETE * FROM confirm WHERE player='$lowercaseName';")
Ϊ
$this->db->query("DELETE FROM confirm WHERE player='$lowercaseName';")

˵:
ݿMySQL﷨ô涨:
SELECT * FROM ... SELECT Ҫд*
DELETE FROM...     DELETE ǲҪ*
BUGû޸֮ǰĺ̨ʾ:
2015-02-27 20:10:16 [CRITICAL] Unhandled exception executing command 'f accept' in f: SQLite3::query(): near "*": syntax error
2015-02-27 20:10:16 [WARNING] RuntimeException: "SQLite3::query(): near "*": syntax error" (E_WARNING) in "/FactionsPro.phar/src/FactionsPro/Main" at line 211