Towy
8fea06d16b
Fix #18304 - Avoid TypeError when adding a column without index data
...
CreateAddField::getIndexedColumns() passed the raw $_POST index values
straight to json_decode(). When a column is added through a request that
does not submit the primary_indexes, indexes, unique_indexes,
fulltext_indexes and spatial_indexes fields (for example when adding a
primary key column from the normalization page), those keys are
undefined. Under strict_types this raised "json_decode(): Argument #1
($json) must be of type string, null given" together with "Undefined
array key" warnings, and the column was not added.
Default each of these request values to an empty JSON array so that
adding a column keeps working when no index information is provided.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com >
Signed-off-by: Towy <towy@airreps.link >
2026-07-09 18:34:22 +02:00
Maurício Meneghini Fauth
af7c5dc083
Fix coding standard issues
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@mfauth.net >
2024-08-27 14:44:06 -03:00
Liviu-Mihail Concioiu
8e64fa51ef
Fix #19254 - Trim spaces around index name ( #19257 )
...
* Trim spaces around index name
Signed-off-by: Liviu-Mihail Concioiu <liviu.concioiu@gmail.com >
* Trim only trailing space
Signed-off-by: Liviu-Mihail Concioiu <liviu.concioiu@gmail.com >
* Trim only trailing space around column name
Signed-off-by: Liviu-Mihail Concioiu <liviu.concioiu@gmail.com >
Fixes #19254
---------
Signed-off-by: Liviu-Mihail Concioiu <liviu.concioiu@gmail.com >
2024-08-16 19:27:19 -03:00
Kamil Tekiela
e0e3748723
Fix ENGINE escaping
...
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com >
2023-03-13 11:58:15 +00:00
Maurício Meneghini Fauth
4d1546f7c5
Fix indentation issues
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev >
2022-10-16 13:41:31 -03:00
Kamil Tekiela
5b471e7c64
Redesign CreateAddField::setColumnCreationStatementSuffix()
...
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com >
2021-12-08 22:24:49 +00:00
Kamil Tekiela
ca089b43ab
Redesign CreateAddField::tryColumnCreationQuery()
...
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com >
2021-12-08 18:27:26 +00:00
Kamil Tekiela
ce820ed522
Redesign CreateAddField::getColumnCreationStatements()
...
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com >
2021-12-08 18:27:26 +00:00
Maurício Meneghini Fauth
f00d70cccb
Remove useless whitespaces
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev >
2021-09-15 17:05:40 -03:00
William Desportes
db01d6a9da
Remove some else conditions by using early exits or moving code
...
Signed-off-by: William Desportes <williamdes@wdes.fr >
2021-04-29 01:18:39 +02:00
William Desportes
c71c11e787
Remove an exit by moving out the preview SQL code on table create add field
...
Signed-off-by: William Desportes <williamdes@wdes.fr >
2021-03-11 21:09:46 +01:00
Maurício Meneghini Fauth
d83abf63e7
Use PSR-12 for control structures spacing
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev >
2021-03-05 15:27:03 -03:00
Maurício Meneghini Fauth
0b8edc5bde
Use PSR-12 for namespace use statements
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev >
2021-03-05 14:18:35 -03:00
William Desportes
5abcae9255
Fixed some typos in the code base
...
I used code spell checker and did all the libraries/classes/*.php files one by one.
Signed-off-by: William Desportes <williamdes@wdes.fr >
2020-11-01 22:46:01 +01:00
Maurício Meneghini Fauth
db3da81056
Remove some useless comments
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev >
2020-10-13 19:56:56 -03:00
Maurício Meneghini Fauth
bb32ba6d9c
Fix some coding standard issues
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev >
2020-10-04 12:31:43 -03:00
Maurício Meneghini Fauth
cbaa67ea6c
Fix some type errors detected by PHPStan
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev >
2020-10-02 14:11:58 -03:00
Maurício Meneghini Fauth
3b285ff17e
Use identical operator for non-empty strings
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev >
2020-07-10 18:06:29 -03:00
Maurício Meneghini Fauth
a3147c26e1
Extract exit; from Core::previewSQL method
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev >
2020-07-09 16:20:41 -03:00
Maurício Meneghini Fauth
f4582e083e
Use early exit when possible
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev >
2020-05-27 00:35:24 -03:00
Maurício Meneghini Fauth
3baad2eb1c
Fix some coding standard issues
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev >
2020-05-25 22:42:37 -03:00
William Desportes
cfc17e56ea
Fix some potential bugs after my last commit
...
Signed-off-by: William Desportes <williamdes@wdes.fr >
2020-05-20 01:43:57 +02:00
Maurício Meneghini Fauth
a64393e7f5
Fix some coding standard issues
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev >
2020-05-13 00:23:28 -03:00
William Desportes
81a2504780
Merge branch 'QA_5_0'
...
Signed-off-by: William Desportes <williamdes@wdes.fr >
2020-03-19 23:41:17 +01:00
William Desportes
ca42395ee4
Fix #15898 - escape tbl_storage_engine argument
...
Signed-off-by: William Desportes <williamdes@wdes.fr >
2020-02-28 23:11:47 +01:00
Maurício Meneghini Fauth
206199105e
Remove useless return type annotations
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev >
2020-01-23 13:03:29 -03:00
Maurício Meneghini Fauth
6584b01824
Use short versions of scalar types in PHP docs
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev >
2020-01-23 12:20:04 -03:00
Maurício Meneghini Fauth
676f48349a
Reference global funcs and consts via use statement
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev >
2020-01-21 22:13:36 -03:00
Maurício Meneghini Fauth
f80d3e3bd4
Remove unnecessary annotations
...
@package, @subpackage and others.
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev >
2020-01-20 17:35:56 -03:00
Maurício Meneghini Fauth
6283caaabf
Use one line for comments with a single line
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev >
2020-01-20 16:04:09 -03:00
Maurício Meneghini Fauth
c231652c67
Remove useless comments in PHP docs
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev >
2020-01-20 14:38:49 -03:00
Kartik Kathuria
9054d1f673
Added LOCK=NONE
...
Signed-off-by: Kartik Kathuria <kathuriakartik0@gmail.com >
2020-01-17 20:42:09 +05:30
William Desportes
e17a787acc
Merge #15420 - Add #15312 Implement ONLINE transaction (ALGORITHM=INPLACE)
...
Pull-request: #15420
Fixes : #15312
Signed-off-by: William Desportes <williamdes@wdes.fr >
2020-01-17 14:05:42 +01:00
Kartik Kathuria
a439082dba
Change ALTER ONLINE to ALGORITHM=INPLACE at required position
...
Signed-off-by: Kartik Kathuria <kathuriakartik0@gmail.com >
2020-01-17 13:36:06 +05:30
Maurício Meneghini Fauth
10395f9ea8
Create Table\AddFieldController controller
...
Moves the add field entry point logic the controller and removes the
entry point file.
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev >
2019-12-23 20:51:40 -03:00
Maurício Meneghini Fauth
f6a17433a2
Use null coalesce operator when possible
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev >
2019-12-11 20:16:58 -03:00
Maurício Meneghini Fauth
dd06cd38f8
Defines rules for double quote usage
...
Makes sure that any use of double quotes strings are warranted.
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev >
2019-12-01 14:10:07 -03:00
Hugues Peccatte
3255e4ad7b
Split Util class regarding the responsabilities ( #15567 )
...
PhpMyAdmin\Util is a very huge class with a lot of responsabilities.
There is a lot of work to split it, but this may be just a small start, waiting for a more normalized code.
* Split Util class regarding the responsabilities
* Split the buttonOrImage function
Signed-off-by: Hugues Peccatte <hugues.peccatte@gmail.com >
2019-11-21 20:20:05 -03:00
William Desportes
acba81e091
Merge branch 'QA_5_0'
...
Signed-off-by: William Desportes <williamdes@wdes.fr >
2019-11-10 21:06:25 +01:00
William Desportes
df0543694c
Merge branch 'QA_4_9' into QA_5_0
...
Signed-off-by: William Desportes <williamdes@wdes.fr >
2019-11-10 20:54:15 +01:00
William Desportes
8aad190ae0
Fix #14951 - Moving Columns with DEFAULT NULL doesn't work on MariaDB 10.2+
...
Ref: 98a7479174
Signed-off-by: William Desportes <williamdes@wdes.fr >
2019-11-09 23:08:54 +01:00
Maurício Meneghini Fauth
1a14b3e4d3
Remove vim modelines
...
These settings are no longer required as they are guaranteed through
other coding standard tools.
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev >
2019-09-02 09:43:21 -03:00
William Desportes
f428277bad
Merge branch 'QA_4_9' into 'QA_5_0'
...
Signed-off-by: William Desportes <williamdes@wdes.fr >
2019-08-20 11:08:28 +02:00
Maurício Meneghini Fauth
a862694bc8
Use the router for the table create page
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev >
2019-08-15 22:37:51 -03:00
Maurício Meneghini Fauth
3c6c087c40
Use the router for the table addfield page
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev >
2019-08-15 21:18:40 -03:00
Maurício Meneghini Fauth
69d279d68c
Use the router for the table replace page
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev >
2019-08-15 20:30:43 -03:00
William Desportes
990323e8db
Merge branch 'QA_4_9' into QA_5_0
...
Signed-off-by: William Desportes <williamdes@wdes.fr >
2019-08-15 23:51:19 +02:00
William Desportes
cfa1be5916
Fix #14950 - Left database overview "add column" triggers error
...
Fixes : #14950
Fixes : #15430
Pull-request: #15431
Signed-off-by: William Desportes <williamdes@wdes.fr >
2019-08-15 20:42:52 +02:00
Shen Chen
e9ca69dcb7
[Bugfix] update if statement to make sure the field is not empty.
...
Signed-off-by: Shen Chen <schen89@live.com >
2019-08-13 23:59:32 -04:00
Hugues Peccatte
3243a9158d
Remove use of unexisting variables
...
Remove useless variables
Signed-off-by: Hugues Peccatte <hugues.peccatte@gmail.com >
2019-05-11 00:34:57 +02:00