Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upNOTICE: PHP message: PHP Fatal error: Uncaught TypeError: implode() expects parameter 2 to be array, null given in src/Utils/Routine.php:123 #293
Labels
Comments
Member
williamdes
commented
Feb 28, 2020
{
"name": {
"database": null,
"table": "foo",
"column": null,
"expr": "`foo`",
"alias": null,
"function": null,
"subquery": null
},
"entityOptions": {
"options": []
},
"fields": null,
"select": null,
"like": null,
"partitionBy": null,
"partitionsNum": null,
"subpartitionBy": null,
"subpartitionsNum": null,
"partitions": null,
"table": null,
"return": null,
"parameters": [
{
"name": "$",
"inOut": null,
"type": {
"name": "FOO",
"parameters": [],
"options": {
"options": []
}
}
},
{
"name": null,
"inOut": null,
"type": null
}
],
"body": [
{
"token": "select",
"value": "SELECT",
"keyword": "SELECT",
"type": 1,
"flags": 3,
"position": 54
},
{
"token": " ",
"value": " ",
"keyword": null,
"type": 3,
"flags": 0,
"position": 60
},
{
"token": "$",
"value": "$",
"keyword": null,
"type": 0,
"flags": 0,
"position": 61
},
{
"token": "foo",
"value": "foo",
"keyword": null,
"type": 0,
"flags": 0,
"position": 62
},
{
"token": null,
"value": null,
"keyword": null,
"type": 9,
"flags": 0,
"position": null
}
],
"options": {
"options": {
"4": {
"name": "DEFINER",
"equals": true,
"expr": {
"database": null,
"table": null,
"column": "root@%",
"expr": "`root`@`%`",
"alias": null,
"function": null,
"subquery": null
},
"value": "`root`@`%`"
},
"6": "PROCEDURE"
}
},
"first": 0,
"last": 23
}passed to getParameters |
CREATE DEFINER=`root`@`%` PROCEDURE `$a`(IN `$a` INT)
NO SQL
SELECT $a
-- or
CREATE DEFINER=`root`@`%` PROCEDURE `foo`( $foo int )
select $fooI had not success adding a test public function testGetParametersFromCreateStatement()
{
//CREATE DEFINER=`root`@`%` PROCEDURE `$a`(IN `$a` INT)\n NO SQL\nSELECT $a
$parser = new Parser('CREATE DEFINER=`root`@`%` PROCEDURE `foo`( $foo int )\nselect $foo');
/**
* @var CreateStatement $stmt
*/
$stmt = $parser->statements[0];
$this->assertNotNull(Routine::getParameters($stmt));
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment