Jump to content
Sign in to follow this  
Blesta Addons

service fields key validation

Recommended Posts

the blesta has a limit for the service key field, it would better to made a check before sending the fields to the service controller to add add/edit service. i found this in my blesta logs

PDOException: SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'key' at row 1 in /home/***********/public_html/vendors/minphp/db/src/PdoConnection.php:196 Stack trace: #0 /home/***********/public_html/vendors/minphp/db/src/PdoConnection.php(196): PDOStatement->execute(Array) #1 /home/***********/public_html/vendors/minphp/record/src/Record.php(275): Minphp\Db\PdoConnection->query('INSERT INTO `se...', Array) #2 /home/***********/public_html/app/models/services.php(3654): Minphp\Record\Record->insert('service_fields', Array, Array) #3 /home/***********/public_html/app/models/services.php(3604): Services->addField('16241', Array) #4 /home/***********/public_html/app/models/services.php(1266): Services->setFields('16241', Array) #5 /home/***********/public_html/app/controllers/admin_clients.php(6053): Services->add(Array, Array, true) #6 /home/***********/public_html/app/controllers/admin_clients.php(5941): AdminClients->createService(Array, Array) #7 /home/***********/public_html/app/controllers/admin_clients.php(4688): AdminClients->processServiceStep('confirm', Object(stdClass), Object(stdClass), Object(stdClass)) #8 /home/***********/public_html/vendors/minphp/bridge/src/Lib/Dispatcher.php(142): AdminClients->addService() #9 /home/***********/public_html/index.php(21): Dispatcher::dispatch('/admin/clients/...') #10 {main} 

i don't have info about this action, but maybe one of the staff are wanting to add service with long key in the service field .

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...