Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reverse Routing #3

Closed
lonnieezell opened this issue Nov 5, 2015 · 0 comments
Closed

Reverse Routing #3

lonnieezell opened this issue Nov 5, 2015 · 0 comments
Labels
enhancement PRs that improve existing functionalities

Comments

@lonnieezell
Copy link
Member

Need to add Reverse Routing ability to the router library for a couple of reasons:

  • Allows a simpler way to add links in views that protects against the route changing.
  • Will allow us to restrict the redirect() method to only routes that exist on the site (assuming that the app is requiring all routes to exist in the routes file. This helps to address the OWASP's Unvalidated Redirects and Forwards attack.
@lonnieezell lonnieezell added the enhancement PRs that improve existing functionalities label Nov 5, 2015
Sosko added a commit to Sosko/CodeIgniter4 that referenced this issue Sep 24, 2020
If thy table haven't primary key, and i pass $returnID = false, than the ci4 throw this error:
```
CRITICAL - 2020-09-24 00:47:00 --> pg_query(): Query failed: ERROR:  lastval is not yet defined in this session
#0 [internal function]: CodeIgniter\Debug\Exceptions->errorHandler(2, 'pg_query(): Que...', '/var/www/ci4/sy...', 196, Array)
codeigniter4#1 /var/www/ci4/system/Database/Postgre/Connection.php(196): pg_query(Resource id codeigniter4#9, 'SELECT LASTVAL(...')
codeigniter4#2 /var/www/ci4/system/Database/BaseConnection.php(741): CodeIgniter\Database\Postgre\Connection->execute('SELECT LASTVAL(...')
codeigniter4#3 /var/www/ci4/system/Database/BaseConnection.php(669): CodeIgniter\Database\BaseConnection->simpleQuery('SELECT LASTVAL(...')
codeigniter4#4 /var/www/ci4/system/Database/Postgre/Connection.php(519): CodeIgniter\Database\BaseConnection->query('SELECT LASTVAL(...')
codeigniter4#5 /var/www/ci4/system/Model.php(887): CodeIgniter\Database\Postgre\Connection->insertID()
codeigniter4#6 /var/www/ci4/app/Models/MyModel.php(46): CodeIgniter\Model->insert(Array, false)
codeigniter4#7 /var/www/ci4/app/Controllers/MyController.php(113): App\Models\MyModel->new_connection('1', '1')
codeigniter4#8 /var/www/ci4/app/Controllers/MyController.php(54): App\Controllers\MyController->do_create_connection()
codeigniter4#9 /var/www/ci4/system/CodeIgniter.php(918): App\Controllers\MyController->create_connection()
codeigniter4#10 /var/www/ci4/system/CodeIgniter.php(404): CodeIgniter\CodeIgniter->runController(Object(App\Controllers\MyController))
codeigniter4#11 /var/www/ci4/system/CodeIgniter.php(312): CodeIgniter\CodeIgniter->handleRequest(NULL, Object(Config\Cache), false)
codeigniter4#12 /var/www/ci4/public/index.php(45): CodeIgniter\CodeIgniter->run()
codeigniter4#13 {main}
CRITICAL - 2020-09-24 00:47:00 --> Uncaught CodeIgniter\Format\Exceptions\FormatException: Failed to parse json string, error: "Type is not supported". in /var/www/ci4/system/Format/Exceptions/FormatException.php:9
Stack trace:
#0 /var/www/ci4/system/Format/JSONFormatter.php(71): CodeIgniter\Format\Exceptions\FormatException::forInvalidJSON('Type is not sup...')
codeigniter4#1 /var/www/ci4/system/API/ResponseTrait.php(414): CodeIgniter\Format\JSONFormatter->format(Array)
codeigniter4#2 /var/www/ci4/system/API/ResponseTrait.php(134): CodeIgniter\Debug\Exceptions->format(Array)
codeigniter4#3 /var/www/ci4/system/Debug/Exceptions.php(168): CodeIgniter\Debug\Exceptions->respond(Array, 500)
codeigniter4#4 [internal function]: CodeIgniter\Debug\Exceptions->exceptionHandler(Object(ErrorException))
codeigniter4#5 {main}
  thrown
#0 [internal function]: CodeIgniter\Debug\Exceptions->shutdownHandler()
codeigniter4#1 {main}
```
This will skip to getting inserted ID
@Muneeb1998 Muneeb1998 mentioned this issue Sep 26, 2020
kenjis added a commit that referenced this issue Nov 30, 2023
1) CodeIgniter\Database\Live\DbUtilsTest::testUtilsCSVFromResult
TypeError: str_replace(): Argument #3 ($subject) must be of type array|string, int given

/home/runner/work/CodeIgniter4/CodeIgniter4/system/Database/BaseUtils.php:217
/home/runner/work/CodeIgniter4/CodeIgniter4/tests/system/Database/Live/DbUtilsTest.php:186

2) CodeIgniter\Database\Live\DbUtilsTest::testUtilsXMLFromResult
TypeError: xml_convert(): Argument #1 ($str) must be of type string, int given, called in /home/runner/work/CodeIgniter4/CodeIgniter4/system/Database/BaseUtils.php on line 249

/home/runner/work/CodeIgniter4/CodeIgniter4/system/Helpers/xml_helper.php:20
/home/runner/work/CodeIgniter4/CodeIgniter4/system/Database/BaseUtils.php:249
/home/runner/work/CodeIgniter4/CodeIgniter4/tests/system/Database/Live/DbUtilsTest.php:199
kenjis added a commit that referenced this issue Dec 9, 2023
[DEPRECATED] str_ireplace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in SYSTEMPATH\Honeypot\Honeypot.php on line 93.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement PRs that improve existing functionalities
Projects
None yet
Development

No branches or pull requests

1 participant