質問編集履歴
3
セキュリティの関わる問題なので削除させていただきました。
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
セキュリティの関わる問題なので削除させていただきました。
|
test
CHANGED
@@ -1,121 +1 @@
|
|
1
|
-
```ここに言語を入力
|
2
|
-
|
3
|
-
if ( file_exists( DIR_ENTITY."/conf/table.dat" ) ){
|
4
|
-
|
5
|
-
$fp = fopen(DIR_ENTITY."/conf/desc.dat", "r");
|
6
|
-
|
7
|
-
while (($buffer = fgets($fp)) !== false) {
|
8
|
-
|
9
|
-
$buffer = ereg_replace("\r|\n","",$buffer);
|
10
|
-
|
11
|
-
if ( $buffer == "" ){ continue; }
|
12
|
-
|
13
|
-
$arr=split(' ',$buffer);
|
14
|
-
|
15
|
-
if ( empty($arr[0]) ){ continue; }
|
16
|
-
|
17
|
-
if ( empty($arr[1]) ){ continue; }
|
18
|
-
|
19
|
-
if ( empty($arr[2]) ){
|
20
|
-
|
21
|
-
$col_data[$arr[0]][$arr[1]]="";
|
22
|
-
|
23
|
-
}else{
|
24
|
-
|
25
|
-
$col_data[$arr[0]][$arr[1]]=$arr[2];
|
26
|
-
|
27
|
-
}
|
28
|
-
|
29
|
-
if ( empty($arr[3]) ){
|
30
|
-
|
31
|
-
$code_data[$arr[0]][$arr[1]]="";
|
32
|
-
|
33
|
-
}else{
|
34
|
-
|
35
|
-
$code_data[$arr[0]][$arr[1]]=$arr[3];
|
36
|
-
|
37
|
-
}
|
38
|
-
|
39
|
-
}
|
40
|
-
|
41
|
-
fclose($fp);
|
42
|
-
|
43
|
-
}
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
ここで$col_dataの宣言はされています。
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
foreach ($configurations as $configuration) {
|
54
|
-
|
55
|
-
if($configuration['DBS']['NAME']==$p_database_id){
|
56
|
-
|
57
|
-
$p_table_id=$configuration['TBLS']['TBL_NAME'];
|
58
|
-
|
59
|
-
$column_name=$configuration['COLUMNS_V2']['COLUMN_NAME'];
|
60
|
-
|
61
|
-
$type_name=$configuration['COLUMNS_V2']['TYPE_NAME'];
|
62
|
-
|
63
|
-
$db_database=$configuration['DBS']['NAME'];
|
64
|
-
|
65
|
-
$par_flg=0;
|
66
|
-
|
67
|
-
if ( empty($col_data[$p_table_id][$column_name]) ){
|
68
|
-
|
69
|
-
$entity_name="";
|
70
|
-
|
71
|
-
}else{
|
72
|
-
|
73
|
-
$entity_name=$col_data[$p_table_id][$column_name];
|
74
|
-
|
75
|
-
}
|
76
|
-
|
77
|
-
if ( empty($code_data[$p_table_id][$column_name]) ){
|
78
|
-
|
79
|
-
$code_name="";
|
80
|
-
|
81
|
-
}else{
|
82
|
-
|
83
|
-
$code_name=$code_data[$p_table_id][$column_name];
|
84
|
-
|
85
|
-
}
|
86
|
-
|
87
|
-
$p_data.="$p_table_id,$column_name,$type_name,$entity_name,$par_flg,$code_name";
|
88
|
-
|
89
|
-
}else{continue;}
|
90
|
-
|
91
|
-
```
|
92
|
-
|
93
|
-
このコードにいて
|
94
|
-
|
95
|
-
```ここに言語を入力
|
96
|
-
|
97
|
-
if ( empty($col_data[$p_table_id][$column_name]) ){
|
98
|
-
|
99
|
-
に対して
|
100
|
-
|
101
|
-
Notice (8): Uninitialized string offset: 0 [APP/controllers/entity_controller.php, line 377]
|
102
|
-
|
103
|
-
二回目の
|
104
|
-
|
105
|
-
if ( empty($col_data[$p_table_id][$column_name]) ){
|
106
|
-
|
107
|
-
Notice (8): Uninitialized string offset: 0 [APP/controllers/entity_controller.php, line 382]
|
108
|
-
|
109
|
-
```
|
110
|
-
|
111
|
-
と怒られてしまいます
|
112
|
-
|
113
|
-
中身がない時の処理も書いているのに何が原因でしょうか?
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
追記
|
120
|
-
|
121
|
-
|
1
|
+
セキュリティの関わる問題なので削除させていただきました。
|
2
コードの追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -1,4 +1,54 @@
|
|
1
1
|
```ここに言語を入力
|
2
|
+
|
3
|
+
if ( file_exists( DIR_ENTITY."/conf/table.dat" ) ){
|
4
|
+
|
5
|
+
$fp = fopen(DIR_ENTITY."/conf/desc.dat", "r");
|
6
|
+
|
7
|
+
while (($buffer = fgets($fp)) !== false) {
|
8
|
+
|
9
|
+
$buffer = ereg_replace("\r|\n","",$buffer);
|
10
|
+
|
11
|
+
if ( $buffer == "" ){ continue; }
|
12
|
+
|
13
|
+
$arr=split(' ',$buffer);
|
14
|
+
|
15
|
+
if ( empty($arr[0]) ){ continue; }
|
16
|
+
|
17
|
+
if ( empty($arr[1]) ){ continue; }
|
18
|
+
|
19
|
+
if ( empty($arr[2]) ){
|
20
|
+
|
21
|
+
$col_data[$arr[0]][$arr[1]]="";
|
22
|
+
|
23
|
+
}else{
|
24
|
+
|
25
|
+
$col_data[$arr[0]][$arr[1]]=$arr[2];
|
26
|
+
|
27
|
+
}
|
28
|
+
|
29
|
+
if ( empty($arr[3]) ){
|
30
|
+
|
31
|
+
$code_data[$arr[0]][$arr[1]]="";
|
32
|
+
|
33
|
+
}else{
|
34
|
+
|
35
|
+
$code_data[$arr[0]][$arr[1]]=$arr[3];
|
36
|
+
|
37
|
+
}
|
38
|
+
|
39
|
+
}
|
40
|
+
|
41
|
+
fclose($fp);
|
42
|
+
|
43
|
+
}
|
44
|
+
|
45
|
+
|
46
|
+
|
47
|
+
ここで$col_dataの宣言はされています。
|
48
|
+
|
49
|
+
|
50
|
+
|
51
|
+
|
2
52
|
|
3
53
|
foreach ($configurations as $configuration) {
|
4
54
|
|
@@ -61,3 +111,11 @@
|
|
61
111
|
と怒られてしまいます
|
62
112
|
|
63
113
|
中身がない時の処理も書いているのに何が原因でしょうか?
|
114
|
+
|
115
|
+
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
追記
|
120
|
+
|
121
|
+
コードの追加させていただきました。
|
1
追加
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
Uninitialized string offset: の解決
|
1
|
+
Uninitialized string offset:0 の解決
|
test
CHANGED
@@ -46,7 +46,15 @@
|
|
46
46
|
|
47
47
|
if ( empty($col_data[$p_table_id][$column_name]) ){
|
48
48
|
|
49
|
+
に対して
|
50
|
+
|
51
|
+
Notice (8): Uninitialized string offset: 0 [APP/controllers/entity_controller.php, line 377]
|
52
|
+
|
53
|
+
二回目の
|
54
|
+
|
49
|
-
f ( empty($co
|
55
|
+
if ( empty($col_data[$p_table_id][$column_name]) ){
|
56
|
+
|
57
|
+
Notice (8): Uninitialized string offset: 0 [APP/controllers/entity_controller.php, line 382]
|
50
58
|
|
51
59
|
```
|
52
60
|
|